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:output 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:output 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?
--
si***@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
;; When all else fails, read the distractions.