Hi,
I am trying to do something with an xsl stylesheet (1.0) that seems
like it should be pretty simple, but I can't figure out how to do it
or find any examples on the Web that work-. I have a set of Dublin
Core XML records that have the subjects as either LCSH or TGM. The
type of subject is identified by xsi:type. So for an individual
record, the subjects may look something like this:
<dc:subject xsi:type="dcterms:LCSH">Drum--Kurdistan</dc:subject>
<dc:subject xsi:type="dcterms:TGM">Drums (Musical
instruments)--Kurds</dc:subject>
I want this to display something like:
Subject (LCSH): Drum--Kurdistan
Subject (TGM): Drums (Musical instruments)--Kurds
The following works fine to print the subjects (as part of an HTML
table) but (obviously) does not take into account the type of subject
heading:
<xsl:for-each select="//dc:subject">
<tr>
<td scope="col" class="width1"/>
<th scope="col" class="width20">Subject: </th>
<td scope="col" class="widthAuto"><xsl:value-of select="." />
</td>
</tr>
</xsl:for-each>
I need some sort of logic to test what the value of xsi:type is but
I'm lost. I have been trying to find examples on how to do this on th
Web and in a few XSLT books we have in the library with no luck. Any
ideas?
Edward
|