RE: Full xml output

Subject: RE: Full xml output
From: "DuCharme, Robert" <Robert.DuCharme@xxxxxxxxxx>
Date: Tue, 27 Jun 2000 10:19:04 -0400
>In converting a file from SGML to XML, I 
>have come across a versioning system that, I think,
>provides a fair use case for the ability to output entities.
>Of course the parser converts the entities to values,
>but my 'need' is to have, as part of the xml output
>(having been through xt) the entities, rather than the version numbers.
>Can it be done other than by a search and replace in the output xml file?

The need to output entity references is something that I can understand, and
this has given me my only need to use disable-output-escaping (well, entity
references and character references). However, you're talking about a bigger
problem, because you want to detect entity references in the input so that
you can output them. The problem with this (as I understand it) is that an
XSLT processor uses an XML parser to read in and parse the input, and part
of the XML parser's job is to replace entity references with the appropriate
text before handing them off to the application--in this case, the XSLT
processor. So, the XSLT processor has no way of knowing where the entity
references were in the original input. 

>Can it be done other than by a search and replace in the output xml file?

How about a search and replace on the input? For example, convert each
&relvers; to something like <version name="relvers"/> and then convert that
to &relvers; as part of your XSL stylesheet? Just a (somewhat kludgy)

Good luck!

Bob DuCharme           <bob@>  "The elements be kind to thee, and make thy
spirits all of comfort!" Anthony and Cleopatra, III ii

 XSL-List info and archive:

Current Thread