[xsl] Identity transformation for XSLT 2.0

Subject: [xsl] Identity transformation for XSLT 2.0
From: "Jesper Tverskov" <jesper@xxxxxxxxxxx>
Date: Mon, 17 Dec 2007 06:44:20 +0100
Hi list

I have tried to make a stylesheet that can make a complete identity
transformation in XSLT 2.0. I have probably forgotten a few things,
please have a look.

I have published a tutorial about it:
http://www.xmlplease.com/identity-template.

The stylesheet is here:
http://www.xmlplease.com/identity-template.xsl.

The traditional identity template is not complete:

1. The XML declaration is not recreated.
2. The DOCTYPE declaration is not recreated.
3. Linefeed and indention in the prolog are ignored outside comments and PIs.
4. Leading whitespace is normalized for content in PIs in prolog
removing linefeeds and indention.
5. CDATA sections are replaced with their content escaped.
6. Default attributes in DTD are added to the output.

I hope I have solved all problems.

Cheers,

Jesper Tverskov
http://www.xmlplease.com

Current Thread