Re: Identity transformation for XSLT 2.0
Update I have now updated my better identity transformation for XSLT 2.0, www.xmlplease.com/identity-template.xsl. The tutorial will also be updated in a day or two. I have added one more replacement character to protect all forms of entities simply by replacing the ampersands. This works nicely for named entities declared in a DTD and for character entities. Compare that to the traditional identity template replacing e.g.   with a space! I now use restricted words as parameters instead of UNICODE characters from the Private Use Area. Words are clumsy but less confusing, and it is easier to detect if they are already used in input. Such testing is also now in place using xsl:message. The REGEX for DOCTYPE now also gets internal DTD subsets right, I hope. I have tested it with my poor man's test suite, including the XSLT 2.0 spec and a heavy Chinese homepage well-formed but far from valid. I both cases the identity transformation is 100%. I would call them photographic. But there must still be a lot of issues? Cheers, Jesper Tverskov www.xmlplease.com/identity-template
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format