[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How to modify a RDF document and preserve the
Subject: Re: [xsl] How to modify a RDF document and preserve the <!DOCTYPE rdf:RDF[ and entity references?
From: Syd Bauman <Syd_Bauman@xxxxxxxxx>
Date: Sun, 6 Mar 2011 09:11:00 -0500

> So probably then I'll just write a xsl that used unparsed-text()
> and analyze-string to do that work around and go from there.

Personally, if I'm going to use such non-XML hacks, I prefer to do
them outside of XSLT, so they don't look like they have the stature
of real XML processing.

   perl -pe < 's,&([A-Za-z][A-Za-z0-9._-]*);,#$1;,g;' < in.xml
      | xsltengine -
      | perl -pe 's,#,&,g;' > out.xml

(all on one line, of course) works nicely for me so long as '#' is
chosen to be a character that does not occur naturally in in.xml.


Current Thread
Keywords