xsl-list
[Top] [All Lists]

Re: [xsl] How to modify a RDF document and preserve the <!DOCTYPE rdf:RDF[ and entity references?

2011-03-06 08:11:09
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.

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