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

Re: Re: Identity transformation for XSLT 2.0

Subject: Re: Re: Identity transformation for XSLT 2.0
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 19 Dec 2007 12:35:52 GMT
Re:  Re: Identity transformation for XSLT 2.0
>  Compare that to the traditional identity template replacing
> e.g. &#160; with a space!

It doesn't get replaced by a space (character 32) but by a non breaking
space (character 160), every XMl application will treat character 160
the same as &#160; so really nothing is lost here, and if you want to
re-instate references, it's more reliable to use a character map or just
specify an output encoding (such as US-ASCII) that doesn't have the
character.


The stylesheet still fails to parse many XML constructs

<!DOCTYPE x [
<!ENTITY x "x]>">
]>
<x>&x;</x>


is converted to

<!DOCTYPE x [
<!ENTITY x "x]>"?>
]?>
<x>&x;</x>


which is not well formed.

Documents with CDATA sections fail to parse altogether:

 <z>zzz<![CDATA[ <]]></z>


produces:

$ saxon9 id2.xml identity-template.xsl
Error on line 2 column 71 of file:/c:/tmp/identity-template.xsl:
  SXXP0003: Error reported by XML parser: Element type "x4g9m2h5g7v3k991n5n6r" must be
  followed by either attribute specifications, ">" or "/>".
Error at xsl:document on line 172 of file:/c:/tmp/identity-template.xsl:
  org.xml.sax.SAXParseException: Element type "x4g9m2h5g7v3k991n5n6r" must be followed by
  either attribute specifications, ">" or "/>".
Transformation failed: Run-time errors were reported


David

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.