|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








