Subject: [xsl] Links for IDREFS From: "Kaarle Kaila" <kaarle.kaila@xxxxxx> Date: Thu, 8 Jan 2004 12:00:21 +0200 |
hello, I have an XML file containing person information. The data is grouped into table elements The person element may have a table attribute that indicates the table the person "owns". Below is a simple example of this: ....XML code snippet ... <table number="1"> <person sex="M" table="5"> <name><givenname>Seppo </givenname><surname>Kaila</surname></name> </person> </table> .... XSLT snippet that creates a html link for above person. <xsl:template match="person"> <xsl:variable name="lname" select="@table"/> <a href="data{$lname}.html">Table <xsl:value-of select="@table"/></a> </xsl:template> -------------------------------------------- I have also cases where person is a member of several tables. These I indicate by using tables attributes like in next piece of XML similarly as IDREFS types in XML: <table number="1"> <person sex="M" tables="5 7 10"> <name><givenname>Seppo </givenname><surname>Kaila</surname></name> </person> </table> ........ How should I create links to all tables with result something like this: Tables <a href="data5.html">5</a>, <a href="data7.html">7</a>, <a href="data10.html">10</a> ------------------------ regards Kaarle Kaila -- Kaarle Kaila email: kaarle dot kaila at iki dot fi www.iki.fi/kaila XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] getting the max value in , Andrew Welch | Thread | Re: [xsl] Links for IDREFS, Jarkko . Moilanen |
RE: [xsl] getting the max value in , Jim Fuller | Date | Re: [xsl] Links for IDREFS, Jarkko . Moilanen |
Month |