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

Re: Commenting selected elements (parents) and keeping

Subject: Re: Commenting selected elements (parents) and keeping the child elements with attributes/restoring parents elements somewhere else
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Fri, 09 May 2008 12:23:32 +0200
Re:  Commenting selected elements (parents) and keeping
Pankaj Chaturvedi schrieb:
<xsl:template match="ignore:*">

I think I didn't get you. Could you be more specific? What about
trying disable-output-escaping to get this done.

Well, maybe I didn't get you either. I was just wondering what the underlying requirement was. To me, it sounded as if you were looking for a way to make some elements disappear while at the same time retaining them. In programing, that's often done via commenting out. So you asked the list how to comment out those element, and you got a good answer.

I need to restore these elements as comments (I thought that will be
best way) as I need to re-transform back to the original.

I probably got you wrong here. I was just thinking that an alternative way to make some elements disappear while at the same time retaining them (in order to be able to restore them later) might be to move them to another namespace, which I prefixed with "ignore". This presupposes, however, that whoever, or whatever, deals with your data knows how to ignore the elements in the "ignore" namespace. Assuming that it'll be XSLT that deals with your data, I suggested a way to ignore these elements in XSLT (by passing through).

And this assumption of mine may be wrong. Perhaps you just want elements
commented out, and the problem is solved thanks to Michael Kay's answer.

Michael Ludwig

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.