Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Entity references in xml output

From: Tagore Smith <tagore@-------------->
To:
Date: 3/2/2000 5:08:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent