[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Removing namespaces without escaping CDATA???

Subject: Re: Removing namespaces without escaping CDATA???
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 7 Apr 2007 21:26:44 +0100
Re:  Removing namespaces without escaping CDATA???
> Everything inside a CDATA section is ignored by the parser.
well not everything, the only thing CDATA changes is te interpretation
of < and &.


> Can't we incorporate CDATA in XPath data model? i.e. would it be
> useful, if CDATA sections could be first class nodes, as text nodes or
> element nodes?

eek no! The hole point of CDATa sections (and entity definitions) are
that they are an _authoring_ convenience (for human authors) which must
have no effect on subsequent processing. It's no point offering a
simplified input sysntax if teh resulting file means something
different.

So its important that CDATA sections, entity references, the choice of "
or ' around attribute values etc are all normalised away by teh XML
parser so that any XML applications (such as XSLT) have the same
behaviour whether or not they are used. If XSLT (or other XML
applications) could "see" the CDATA section then
<foo><![CDATA[<]]></foo> would not be equivalent to <foo>&t;</foo>
which would be a bad thing.

> Also, specifying cdata-section-elements here, <xsl:output
> cdata-section-elements="qnames" /> seem to have a shortcoming, that
> it's too global (as I said earlier). Do you agree to this point?

It has to be global or you have to be able to somehow annotate
individual elements in the result tree but teh need to annotate teh
result tree leads to all sorts of problems if teh result tree is not
immediately serialised by XSLT but passed to some other process, which
is why disable-output-escaping is such a problem. There is no standard
way of passing a result tree to some other process and recording places
where doe is used.

David

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.