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

RE: Xslt 2.0 disable-output-escaping attributes

Subject: RE: Xslt 2.0 disable-output-escaping attributes
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Mon, 26 Jan 2004 17:33:08 -0000
xsl output escaping
Ok if I actually read the spec :) I would have seen:

<xsl:character-map name="style">
  <xsl:output-character character=">" string="&gt;"/>
</xsl:character-map>

Used in conjuction with:

<xsl:output use-character-maps="style"/>

Two things Ive noticed about this:

1.  http://www.w3.org/TR/xslt20/#element-output-character

The spec here uses the example

<xsl:character-map name="jsp">
  <xsl:output-character char="«" string="&lt;%"/>   
  <xsl:output-character char="»" string="%&gt;"/>
  <xsl:output-character char="§" string='"'/>
</xsl:character-map>

Where the @char should be @character.

2.  For some reason, adding the above character map affects the &lt; in my script block.  For example,

 while (a &lt; el.childNodes.length) {

Without the above character map comes out as an entity unchanged, but with the above map it comes out as '<'


This is highlighted in the following example:

Xml
===
<root>
  Hello &lt; &gt; World
</root>

Xslt
===
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output use-character-maps="root"/>

<xsl:character-map name="root">
  <xsl:output-character character=">" string="&gt;"/>
</xsl:character-map>

</xsl:stylesheet> 

Output
===
<?xml version="1.0" encoding="UTF-8"?>
  Hello < > World


I would have expected the left angle bracket to still be an entity - is this correct?  

Cheers
andrew 

 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.