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

RE: Looping problem

Subject: RE: Looping problem
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 2 Dec 2002 18:06:06 -0500
looping problem
[ Deepak Rao]

> The following is the XML I want to transform. Can anyone help 
> me out in 
> writing a statement which access only the LOOP2 section and 
> its children of 
> the first LOOP1 section. 

There are two LOOP2 elements in the first LOOP1.  I assume you want to
access both of them.

> I want to ingnore the rest of the 
> LOOP1 sections 
> and its children. I want to use a for-each (if possible)

Why are you trying to use a for-each?  I would write (I have renamed the
top-level element to "root" since the name "XML" is a reserved name and
you should not use it) -

<xsl:template select='/root/LOOP1[1]'>
	<xsl:apply-templates select='LOOP2'/>
</xsl:template>

> 
> <XML>
>    <ABC>2323</ABC>
>    <LOOP1>
>       <XYZ>232</XYZ>
>       <ERT>5465</ERT>
>       <LOOP2>
>          <DFG>345</DFG>
>          <CVB>675</CVB>
>       </LOOP2>

<snip/>

Cheers,

Tom P

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


Current Thread
  • Looping problem
    • Deepak Rao - Mon, 2 Dec 2002 17:25:22 -0500 (EST)
      • <Possible follow-ups>
      • Passin, Tom - Mon, 2 Dec 2002 18:01:24 -0500 (EST) <=

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.