This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Outputting literal and 'quoted' tags.
try this
...
<xsl:template match="level1">
<xsl:text disable-output-escaping="yes"><H1>Level1</H1></xsl:text>
<xsl:apply-templates/>
</xsl:template>
...
greetings, Christian
Am 5 Dec 2001, um 11:55 hat Emiliano geschrieben:
> 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
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list