RE: [xsl] serializing and parsing xml in xslt

Subject: RE: [xsl] serializing and parsing xml in xslt
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 6 Jul 2006 22:27:06 +0100
Saxon offers extension functions saxon:parse() and saxon:serialize().

The main use cases are for dealing with "double escaping" where one document
is placed inside a CDATA section within another document; it can also be
handy if you want to post-process the serialized output, for example by
adding an internal DTD. I also have a test driver in which I call
saxon:serialize on the test result and then compare the output with
reference results for the test.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Erik Wilde [mailto:net.dret@xxxxxxxx] 
> Sent: 06 July 2006 22:13
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] serializing and parsing xml in xslt
> 
> hello everybody.
> 
> i ran across a problem where someone wants to basically 
> serialize and parse xml in xslt. the idea is to "package" 
> some xml sub-trees in attribute values as strings (with 
> escaped markup) and then in another transformation to re-use 
> this text as xml. and all this in xslt 1.0...
> 
> i know that this is a weird idea, but i found it challenging 
> to think about how this could be done. i thought that one 
> would basically have to write one's own serializer and parser 
> in xslt, which probably is rather expensive. am i missing 
> some better way to solve this problem?
> 
> thanks and cheers,
> 
> dret.

Current Thread