[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: insert an attribute value through xsl
From: "=?big5?b?qkwgpGyq5A==?=" <minikittygo@xxxxxxxxxxx>
Date: Thu, 31 Jan 2002 13:38:14 +0000
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
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member