Subject: Re: [xsl] Re: Identity transformation for XSLT 2.0 From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 19 Dec 2007 12:35:52 GMT |
> Compare that to the traditional identity template replacing > e.g.   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   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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Identity transformation f, Jesper Tverskov | Thread | Re: [xsl] Re: Identity transformati, Jesper Tverskov |
Re: [xsl] Poor man's test suite, David Carlisle | Date | [xsl] workaround for XSLT 1.0 resul, Don Smith |
Month |