|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: HI
Biswajit, for XSL queries you're much better off asking at xsl list: xsl-list@l... for this problem you need to play around with the position() function. remember that it gives you the position of the node in the nodeset that it's in, not its position in the document. if you do <xsl:apply-templates select="gross|mmmmm"/> the nodeset will consist of all 'gross' and 'mmmmm' elements for this person1 (??), and 'position() mod 2' will give you the id's you want, +/-1. also don't use the 'id' attribute unless you really want to generate unique (within the document) identifiers. hth, /m Martin Klang http://www.o-xml.org - the object-oriented XML programming language On Wed, 20 Nov 2002, SARANGI,BISWAJIT (HP-Germany,ex1) wrote: > I am learning xml and xslt and have one problem which i could not solve > since i week. > i havea xml file like under. > snippet. > <person> > <person1> > <dad>a</dad. > <had>1</had> > <mad>wfff</mad> > <dom>11</dom> > -<gross>2</gross> > -<mmmmm>22</mmmmm> > -<gross>222</gross> > -<mmmmm>333</mmmmm> > --------- > </person1> > <person1> > ------- > ------- > </person1> > </person> > The two items gross and mmmmm has a "n" number of repetition.I want > transform it into another "xml" tree > where the repeted stuff will have one "id" numbers as a counter like 1,2,3.I > want it serially. > > any one has a solution for this. > thanking you in advance. > biswajit sarangi > > > > > > -----Original Message----- > From: Simon St.Laurent [mailto:simonstl@s...] > Sent: Wednesday, November 20, 2002 3:23 PM > To: xml-dev@l... > Subject: Re: What are the arguments *for* XHTML 2.0? > > > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://lists.xml.org/ob/adm.pl> > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://lists.xml.org/ob/adm.pl> >
|
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








