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

Re: Bib refs

Subject: Re: Bib refs
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 23 Feb 2001 15:36:15 GMT
free trial bitex

> Given some para text containing an IDREF reference to something in the 
> bibliography of the document, eg <cit doc="someid">something</cit> ,
> and some biblio references at the end to be sorted, each with an 
> ID attribute, 
> how can I replicate in the <ref> template the value which HTML will 
> generate 
> for the <li> that I am placing round each bib reference after sorting 
> at the endof the doc?

Use BiTeX? Oh no, wrong list.

If it weren't for the sorting (ie if your references were ordered in
your source, you could go)

<xs:apply-templates select="id(@doc)" mode="number"/>

then you could share your templates in mode "number" between the code
that typesets the reference list and the code that typesets the
individual citations.

Howver you do want to sort, so its probably easiest to have a variable
with the sorted list then use a node-set extension to query into that.

so top level
<xsl:variable name="sorted-refs">
  <xsl:for-each select="//refs/*">
    <xsl:sort select="author/name"/>
    <ref number="{position()}">
    <xsl:copy-of select="."/>
    </ref>
</xsl:for-each>
</xsl:variable>

Then something like 
 <xsl:variable name="x" select="@doc"/>
 <xsl:for-each select="$sorted-refs">
   <xsl:value-of select="id($x)/../@number"/>
 </xsl:for-each>

David
(untested)

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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.