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

Re: XSL to put node (and kids) into a comment

Subject: Re: XSL to put node (and kids) into a comment
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 1 Jun 2001 17:53:33 +0100
Re:  XSL to put node (and kids) into a comment
 
 
   >From the XSLT recommendation:

      http://www.w3.org/TR/xslt#section-Creating-Comments

      "It is an error if instantiating the content of xsl:comment creates
      nodes other than text nodes. An XSLT processor may signal the error; if
      it does not signal the error, it must recover by ignoring the offending
      nodes together with their content."

   So, I don't believe you can generate xml within a comment by using
   xsl:comment.  You don't show the results of running your stylesheet, but
   the fragment you posted should produce an empty comment.


That's right. You need to use xsl:comment to generate the comment but
then you need to create the literal text of the element markup for the
content by something like <xsl:apply-templates mode="verb"/>
there's various of these xml listing modes around (some in the FAQ, I
think), I tend to use the one at
http://www.openmath.org/cdfiles/xsl/verb.xsl
which is a bit old but works well enough for this.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
01285 884400.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.