Re: configuring a conditional
At 09:54 PM 5/23/2005, you wrote:
It's easy enough (although possibly expensive) to know if you are the first citation to a particular reference, eg you could use xsl:number and see if you get the number 1, or perhaps better havs an xsl:key that matches all references, keyed on the reference id then you just have to ask if the current node is the first node in document order in the sequence returned by the key for this reference. so for example if the syntax is
The question I'd ask is what's @linkend. This of course depends on what the context node is -- so we need to consider where this appears.
XSLT 2.0 functions work different from templates in that they don't have a context node (or position or size) ... instead of relying on being able to traverse from the context node to its @linkend attribute, for example, you have to pass the node in and then traverse to $node/@linkend.
Could this be an issue here? We need to see more code. But guessing out of the blue (that is, guessing you are defining a function here) I suppose you might try test="$cite-ref is key('refs',$cite-ref/@linkend)".
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