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

Re: How to extract comments only?

Subject: Re: How to extract comments only?
From: Nick Browne <NickBrowne@xxxxxxxxxxxxxxx>
Date: Mon, 26 Jun 2000 22:52:57 +0100
nick browne
Try :

<xsl:template match="/">
  <xsl:for-each select="//comment()">
   <SRC_COMMENT>
   <xsl:value-of select="."/>
   </SRC_COMMENT>
  </xsl:for-each>
 </xsl:template>

or use a <xsl:comment ...> instruction for a more literal duplication of the
source document content in place of my <SRC_COMMENT> tag.

Nick Browne
Slipstone Ltd

X Line wrote:

> I'm still new to XSLT, but have a need to
> extract all comments (however deep) from an
> XML file to another. Output should only
> contain comments and nothing else perhaps
> save the XML declaration (i.e: none
> of the other markup/pcdata). Is this possible
> with XSLT? I couldn't figure out from my
> limited knowledge. Thanks much for any info.
>
> A.
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-



 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.