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

Re: Entity references in xml output

Subject: Re: Entity references in xml output
From: Tagore Smith <tagore@xxxxxxxxxxxxxx>
Date: Thu, 2 Mar 2000 22:08:18 -0500 (EST)
tagore smith
On Thu, 2 Mar 2000, David Carlisle wrote:
> 
> If you want to think of XML as characters in a file rather than as
> trees of nodes then xslt will be very hard to use and you would be
> better to use a language designed to work on text striungs, such as
> perl.
> 

   Which is not always a bad choice for dealing with xml. It has served me
well. Of course xml is pretty hard to deal with in Perl without passing it
through a parser first, which puts you right back in the same situation in
terms of the references. 

   But if you're using Perl you might as well follow in the long tradition
of Perl hacks that _work right now_ (as opposed to tomorrow,
when something changes). Substitute some string that won't
bother the xml parser but is also sure not to naturally occur in your
document for each entity reference. Grab the Perl xml parser and parse
your file. Substitute the original references back
in. Then spit out your transformed file. This is ugly for a couple of
reasons, mainly that it relies on implementation details of the Perl xml
module (built on expat I think). But I think it might be the easiest
way to get what you're asking for. There is also the question: What's
wrong with the Unicode equivalents that you get from the xml parser?

Tagore 



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.