[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Identity transformation for XSLT 2.0
> 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/
|
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
|