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

Re: variable question

Subject: Re: variable question
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Fri, 12 Nov 2004 10:41:48 -0500
xsl for each distinct variable
Just to follow up, with some help off-list from Geert, this gets me what I was looking for:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:db="http://docbook.org/docbook-ng"
exclude-result-prefixes="db mods">


<xsl:output method="xhtml" encoding="UTF-8" indent="yes"/>

<xsl:variable name="bibkey" select="//db:biblioref/@linkend" />

<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Testing</title>
</head>
<body>
<h3>Citations</h3>
<xsl:for-each select="distinct-values($bibkey)">
<ol>
<li><xsl:value-of select="." /></li>
</ol>
</xsl:for-each>
<h3>Titles</h3>
<xsl:for-each select="distinct-values($bibkey)">
<xsl:variable name="bibrecord"
select="doc(concat('bib-data/', ., '.mods'))/mods:modsCollection/mods:mods" />
<ol>
<li><xsl:value-of select="$bibrecord/mods:titleInfo/mods:title" /></li>
</ol>
</xsl:for-each>
</body>
</html>
</xsl:template>


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.