Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: preserving markup

From: "Joseph J. Kesselman" <keshlam-nospam@-------.--->
To: NULL
Date: 6/9/2008 9:32:00 AM

David Schwartz wrote:
> I'm outputing HTML (and Javascript), not XML.
> cdata-section-elements appears to be appropriate only where
> method=xml. Perhaps I'm missing something?

Yes,  <xsl:output cdata-section-elements="code"/> was what I intended.

Some references (including Michael Kay's book, which is one of the best 
hardcopy references I've seen for XSLT) do claim that 
cdata-section-elements is marked as "not applicable to html output". 
However, I've just rechecked and I don't see that restriction in the 
XSLT Recommendation itself. All I can say is "try it, and if it doesn't 
work ask the processor's authors why not."

But: No program ought to care whether you've used CDATA sections or 
individual-character escaping; that distinction is purely a convenience 
for humans. Any program which *insists* on one representation or the 
other is not processing the documents as intended by their spec. There 
are a few special cases where CDATA sections are worth considering -- 
mostly when the document source is intended to be hand-edited by humans 
-- but even there I consider them excessively fragile. So I would also 
beat up whoever wrote the code that is foisting this requirement upon you.


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