Re: XSL command for XLink attributes?

Subject: Re: XSL command for XLink attributes?
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 15 Aug 2000 23:49:54 +0100
Eliza,

>I am trying to find out what the right syntax/command is to display xlink
>attributes described in an XML file.  I am using the "courseload" example
>from W3's XLink Spec (see the excerpts shown below).  Can someone help me
>or point me to some examples on what the stylesheet looks like for printing
>the "person" attributes below.

If you were just after the syntax for getting the value of the attribute,
then something like:

  <xsl:value-of select="@xlink:title" />

will give you the xlink:title of a particular person.

If you were after something more than that, I don't think that there's such
a thing as *the* way to display XLinks.  Obviously to display them, you
have to translate them into HTML somehow so that the browser will work.
You could imagine, with the extended link in your example, producing
something like the following in HTML:

<h2>Course Load for Pat Jones</h2>
<ul>
  <li><a class="student" href="students/patjones62.xml">Pat Jones</a></li>
  <li><a class="student" href="...">..</a></li>
  ...
</ul>

But you could equally do it as a set of options in a drop-down list:

<label for="some-unique-id">Course Load for Pat Jones</label>
<select id="some-unique-id">
  <option value="student62">Pat Jones</option>
  <option value="...">...</option>
  ...
</select>

So the question is really how do you want it to appear?  Once you've
identified that, it will be a lot easier to create a stylesheet to do it.

Let us know,

Jeni

Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread