[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: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Apr 2007 14:02:54 -0400
Re:  Removing namespaces without escaping CDATA???
At 2007-04-09 23:03 +0530, Mukul Gandhi wrote:
I shall try to explain my point of view..

Let's say we have following XML:
<x>
 <y></y>
 <p>
   <y></y>
   <q>
      <y></y>
   </q>
 </p>
</x>
(text content can be placed anywhere as desired)

If I do, <xsl:output cdata-section-elements="y" />, then all y
elements will contain CDATA sections. This may be desirable in very
specific cases. But it will be more convenient, if I am able to put
CDATA section at this location /x/p/q/y, and not to any other y's.

Can we achieve this (in 1.0 or 2.0)?

No ... remember that the emitted result tree cannot be addressed in any fashion and the distinction between the different contexts of "y" in the result tree is, effectively, trying to address the result tree to know "where am I now in the result tree?" in order to selectively apply the serialization rule.


Note in XSLT 2.0 Section 20 and XSLT 1.0 Section 16 that the data type of the cdata-section-elements is just a white-space-separated list of QNames ... there is no opportunity to specify context for each one.

I hope this helps.

. . . . . . . . . . . Ken

--
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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.