[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to modify a RDF document and preserve the <!D

Subject: Re: 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
Re:  How to modify a RDF document and preserve the  <!D
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.