[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Outputting literal and 'quoted' tags.

Subject: Outputting literal and 'quoted' tags.
From: Emiliano <emile@xxxxxxxxxxxxxx>
Date: Wed, 5 Dec 2001 11:55:31 +0100 (CET)
literal markup
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">
        &lt;H1&gt;Level1&lt;/H1&gt;
        <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 &lt; 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.