This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: insert an attribute value through xsl
- From: "=?big5?B?qkwgpGyq5A==?=" <minikittygo at hotmail dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 31 Jan 2002 13:38:14 +0000
- Subject: Re: [xsl] insert an attribute value through xsl
- Reply-to: xsl-list at lists dot mulberrytech dot com
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
_________________________________________________________________
在您的行動裝置上傳送接收 Hotmail 郵件,請移至 http://mobile.msn.com。
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list