Subject: RE: Looping problem
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 2 Dec 2002 18:06:06 -0500
|
[ 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) <=
- Ming Yu - Mon, 9 Dec 2002 13:24:45 -0500 (EST)
|
|