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

Re: insert an attribute value through xsl

Subject: Re: insert an attribute value through xsl
From: "=?big5?b?qkwgpGyq5A==?=" <minikittygo@xxxxxxxxxxx>
Date: Thu, 31 Jan 2002 13:38:14 +0000
xsl position father
Hi there, Thanks for the advise, however there are more i would like to do with such function;

firstly, going back to the example
> <Family>
> <name>Smith</name>
> <parents>
> <father>John</father>
> <mother>Mary</mother>
> </parents>
> <child>Jane</child>
> </Family>
>
> <Family>
> <name>Snow</name>
> <parents>
> <father>Geroge</father>
> <mother>Sue</mother>
> </parents>
> <child>Liz</child>
> <child>Paul</child>
> </Family>
>
> etc....

if i wish to transform to give an attribute for an id tag that will distinish between family. i.e.


> <Family id="1">
> <name>Smith</name>
> <parents>
> <father>John</father>
> <mother>Mary</mother>
> </parents>
> <child>Jane</child>
> </Family>
>
> <Family id="2">
> <name>Snow</name>
> <parents>
> <father>Geroge</father>
> <mother>Sue</mother>
> </parents>
> <child>Liz</child>
> <child>Paul</child>
> </Family>
>
> etc....

Secondly, is there a way that it allows me to insert the position() within the HTML element such as: -
<xsl:template match="Family">
<a name="<xsl:value-of select="position()"/>>Smith</a>
...


that gives something like that at the end: - <a name="2">Smith</a>

i know such approach is not permitted but is there are another way to produce such result?

thanks for your time

Regards
Kit

_________________________________________________________________
¦b±zªº¦æ°Ê¸Ë¸m¤W¶Ç°e±µ¦¬ Hotmail ¶l¥ó¡A½Ð²¾¦Ü http://mobile.msn.com¡C


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

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