Subject: Re: Entity references in xml output From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 03 Mar 2000 13:33:31 +0000 |
Another solution along these lines would be to use your pre-process to turn your & signs in your entities into & entities -- é becomes &eacute; which looks like the string é to the parser, so that's what you'll get in output. It's no good if you want some entities to be passed and not others, of course: all will be affected. --Wendell At 10:08 PM 3/2/00 -0500, you wrote: >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.... ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Entity references in xml output, David Carlisle | Thread | RE: Entity references in xml output, Kay Michael |
RE: doctype decl problem, Pawson, David | Date | Re: Entity references in xml output, Wendell Piez |
Month |