xsl-list
[Top] [All Lists]

[xsl] Identity transformation for XSLT 2.0

2007-12-16 22:44:51
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

--~------------------------------------------------------------------
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>
--~--