[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: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Sat, 7 Apr 2007 19:38:06 +0530
Re:  Removing namespaces without escaping CDATA???
Hi Mike,
  I beg to differ with you about CDATA section usefulness.

If the text in XML contains a lot of "<" or "&" characters - as
program code often does - the XML element can be defined as a CDATA
section. (ref: http://www.w3schools.com/xml/xml_cdata.asp).
Everything inside a CDATA section is ignored by the parser.

Therefore, I think CDATA is pretty useful facility.

If transformer and serializer should not be tightly coupled with this
kind of syntax, <xsl:element name="qname" cdata-section="yes | no" ..

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?

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?

If my suggestions make sense, perhaps this could become one of the
requirement for XSLT 2.x/3.0 or XPath 2.x/3.0.

On 4/7/07, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> The declaration, <xsl:output cdata-section-elements="qnames"
> /> seems to have a shortcoming. It's not generic; in a sense
> that it is global (all elements anywhere in the tree will be
> affected by it).
>
> Any comments please..
>

I think the experience with disable-output-escaping shows that any facility
that requires out-of-band communication between the transformer and the
serializer is architecturally very bad news.

Mind you, I've never found cdata-section-elements very useful. It only
serves to encourage people in the mistaken belief that CDATA section
boundaries are information-bearing.

Michael Kay
http://www.saxonica.com/


--
Regards,
Mukul Gandhi

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.