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

Links for IDREFS

Subject: Links for IDREFS
From: "Kaarle Kaila" <kaarle.kaila@xxxxxx>
Date: Thu, 8 Jan 2004 12:00:21 +0200
xsl idrefs
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

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.