OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] HI

[ Lists Home | Date Index | Thread Index ]


Biswajit,

for XSL queries you're much better off asking at xsl list:
xsl-list@lists.mulberrytech.com

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@simonstl.com]
> Sent: Wednesday, November 20, 2002 3:23 PM
> To: xml-dev@lists.xml.org
> Subject: Re: [xml-dev] 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>
>


  • References:
    • HI
      • From: "SARANGI,BISWAJIT (HP-Germany,ex1)" <biswajit.sarangi@hp.com>



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS