[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: insert an attribute value through xsl
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|