This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Outputting literal and 'quoted' tags.
- From: Emiliano <emile at iris-advies dot nl>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 5 Dec 2001 11:55:31 +0100 (CET)
- Subject: [xsl] Outputting literal and 'quoted' tags.
- Reply-to: xsl-list at lists dot mulberrytech dot com
I'm seeing differing behaviour across xslt processors, I'm hoping
someone can tell me what the specced (if any) behaviour is.
I have a style sheet:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="iso-8859-1"/>
<xsl:template match="level1">
<H1>Level1</H1>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="level2">
<H2>Level2</H2>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="level3">
<H3>Level3</H3>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
with which I want to output a PHP program (which is the reason for the
silly way to write <H1> etc above).
With Sablotron, all comes out as I would expect it. With Saxon, if I do
output method="text" I see the <H1> and </H1> tag but all other tags are
gone. If I do output method="html" I see The <H2> and other literal
markup, but the < etc goes trough as is, not replaced by '<'.
Which would be the correct behaviour, and if Saxon does it right, how to
work around it?
Emile
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list