[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Full xml output
>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) suggestion. Good luck! Bob DuCharme www.snee.com/bob <bob@ snee.com> "The elements be kind to thee, and make thy spirits all of comfort!" Anthony and Cleopatra, III ii XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|