S
Simon Brooke
More silly questions, I'm afraid.
Consider the following stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xhtml">
<xsl
utput indent="yes" method="text"/>
<xsl:template match="/">
£
</xsl:template>
<xsl:template match="*">
<!-- nothing -->
</xsl:template>
</xsl:stylesheet>
When processed by Xalan 2.7.0 or by xsltproc 1.1.19 both output:
 £
(that is not seven-bit clean - if it is not correctly transmitted by NNTP,
it is uppercase A circumflex, space, uppercase A circumflex, pound-sign).
If the output method is changed to 'xml', the output is the same. If the
output method is changed to 'html', however, xsltproc outputs exactly the
same, but Xalan2 outputs:
£
If we now change the stylesheet to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet [
<!ENTITY nobreak " ">
<!ENTITY poundsign "£">
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xhtml">
<xsl
utput indent="yes" method="html"/>
<xsl:template match="/">
&nobreak;£sign;
</xsl:template>
<xsl:template match="*">
<!-- nothing -->
</xsl:template>
</xsl:stylesheet>
then the behaviour is exactly the same as before.
So, questions:
(1) Where does the uppercase A circumflex come from? What do I have to do
to avoid it?
(2) Where does Xalan2 magically get the HTML entity names from, and is it
in accord with the standard in printing them?
Consider the following stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xhtml">
<xsl
<xsl:template match="/">
£
</xsl:template>
<xsl:template match="*">
<!-- nothing -->
</xsl:template>
</xsl:stylesheet>
When processed by Xalan 2.7.0 or by xsltproc 1.1.19 both output:
 £
(that is not seven-bit clean - if it is not correctly transmitted by NNTP,
it is uppercase A circumflex, space, uppercase A circumflex, pound-sign).
If the output method is changed to 'xml', the output is the same. If the
output method is changed to 'html', however, xsltproc outputs exactly the
same, but Xalan2 outputs:
£
If we now change the stylesheet to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet [
<!ENTITY nobreak " ">
<!ENTITY poundsign "£">
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xhtml">
<xsl
<xsl:template match="/">
&nobreak;£sign;
</xsl:template>
<xsl:template match="*">
<!-- nothing -->
</xsl:template>
</xsl:stylesheet>
then the behaviour is exactly the same as before.
So, questions:
(1) Where does the uppercase A circumflex come from? What do I have to do
to avoid it?
(2) Where does Xalan2 magically get the HTML entity names from, and is it
in accord with the standard in printing them?