[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Bib refs
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|