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

Re: commenting Parent element only

Subject: Re: commenting Parent element only
From: "Christopher R. Maden" <crism@xxxxxxxxx>
Date: Sat, 18 Sep 2010 13:01:50 -0400
Re:  commenting Parent element only
pankaj.c@xxxxxxxxxxxxxxxxxx wrote:
> Just to add I am processing the child entry element later.

Donbt do that, then.

Your stylesheet instructs the processor to do the entire comment first,
then do the content.  Thatbs what you are getting.

You need to do something more like:

<xsl:template match="row">
  <xsl:comment>
    <xsl:value-of select="'&lt;'"/>
    <xsl:value-of select="name()"/>
    <xsl:text> </xsl:text>
    <xsl:apply-templates select="@*" mode="comment_element" />
    <xsl:value-of select="'&gt;'"/>
  </xsl:comment>
  <xsl:apply-templates/>
  <xsl:comment>
    <xsl:value-of select="'&lt;/'"/>
    <xsl:value-of select="name()"/>
    <xsl:value-of select="'&gt;'"/>
  </xsl:comment>
</xsl:template>

~Chris
--
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
bI like being free, and that makes me an idiot, I suppose.b
  b Stan Rogers, bThe Idiotb
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319

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.