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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--