|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: output a literal CDATA section
Dear Georges,
Mike already told you that if your needs aren't addressed by cdata-section-elements, you are out of luck in XSLT 1.0. But I'm piqued by your explanation that you need a CDATA section "because I need to edit the output later on". Maybe there's something you aren't telling us, but are you sure you need them? People edit their XML all the time without its text being marked with CDATA sections. Indeed, CDATA marked sections themselves are nothing but syntax sugar for code that would otherwise have to be escaped character by character to prevent it from being parsed as XML (CDATA basically marks a block of escaped content). If you could be more explicit about your requirement and the rationales for it maybe we can help a bit more. Often things like this can be dealt with in a post-processing pass. If you don't know the names of the elements in advance ... what do you know about them? From your example, it appears to me that you could use cdata-section-elements on <programlisting>, but what you want to output the <areaentry> child and its descendants is not copy-of, but xml-writing templates (since this stuff isn't actually to be written as XML, but as escaped XML -- it's "pseudo-XML" hiding in your document). This kind of output is sometimes called "verbatim XML" or "XML as a string" -- look at http://xmlportfolio.com/xml-to-string/ for a nice, fully-worked-out example of this. Cheers, Wendell At 12:23 PM 7/20/2005, you wrote: Hi, ====================================================================== 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 ======================================================================
|
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
|

Cart








