xsl-list
[Top] [All Lists]

RE: [xsl] Identity transformation for XSLT 2.0

2007-12-17 02:55:34

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 can't see how you are handling entity references, which are probably the
biggest bugbear of all.

Generally, while I agree there is a requirement to do what you are
attempting, I'm not convinced this is the right architecture. My preferred
approach would be to prefilter the input document (doing some of the things
you do, and also turning entity references into PIs - except that you can't
do that if they appear in an attribute), then to do a regular
transformation, then to do a postfilter. I'm not sure that XSLT would be my
language of choice for the prefilter, though it can certainly be done [*];
but the important thing is that I think this should be a pipeline of three
transformations, not a single transformation.

[*] the reason for that is that I think the filtering should be done on a
stream of SAX events, not on raw text. Parsing the raw text reliably is just
too difficult, there are too many complexities in the XML specification.

Michael Kay
http://www.saxonica.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>
--~--