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

Re: traversing node by node in apply-templates

Subject: Re: traversing node by node in apply-templates
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Thu, 11 Dec 2003 13:10:05 +0100
apply templates node
ARULRAJ wrote:
I want to traverse content of <rule> one by one. Here
<bindings> and <condition> are appear in XML any
order. So, If I use the below code only <bindings> will be
processed and <condition> next. How to traverse one by
one
<xsl:template match="rule">
<xsl:if test="bindings">
<xsl:apply-templates select="bindings"/>
</xsl:if>
<xsl:if test="condition">
<xsl:apply-templates select="condition"/>
</xsl:if>
</xsl:template>

I think you want <xsl:template match="rule"> <xsl:apply-templates/> </xsl:template>

or perhaps
 <xsl:template match="rule">
   <xsl:apply-templates select="*"/>
 </xsl:template>
in case processing unstripped whitespace nodes triggers
problems.

In any case the xsl:if around the xsl:apply-templates in
your original code are redundant.

J.Pietschmann



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.