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

Re: Retaining Comments

Subject: Re: Retaining Comments
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 22 Nov 2005 16:57:41 +0000
Re:  Retaining Comments
> I note that when I create (copy) an XSLT from another XSLT and the source
> contains comments, these are not copied across. I undestand that comments
> may not be significant to an XSLT processor but does anyone know whether it
> is in fact possible to copy them to the output.
>
> The situation I have is a base XSLT which is then transformed into a new
> XSLT with some small amendments, but I wnat to keep all of the useful
> comments that were in the original.

I don't think the xml parser has to report comments, so its worth
checking that the one you are using isn't dropping them.

Then it depends on how you are doing the copy in your XSLT, you may
just need to provide a matching template as the default one for
comments is to do nothing.

<xsl:template match="comment()">
  <xsl:copy>
    ....

cheers
andrew

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.