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

Re: HI


biswajit sarangi

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>
>


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

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.