Re: [xsl] Numbering cross refs

Subject: Re: [xsl] Numbering cross refs
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 11 Dec 2003 16:05:56 GMT
> The figure does have attribute ID 
You still haven't shown any source code so it's not possible to really
It not only has to have an attribute (of any name) that attribute has to
be declared in a DTD to be of type ID. Otherwise id() function will do

> Here are parts of relavent schema I'm using unless I read it wrong
> figure does have ID

XSLT1 won't look at your schema so IDs declared in a schema don't count.
so you'd better use keys,


<xsl:key  name="ids" match="*[@id] use="@id"/>

to the top level of your stylesheet then use

<xsl:for-each select="key('ids',@xrefid)">

instead of id(@xrefid)

the for-each will iterate over exactly one node (your figure) then
xsl:number will generate the right number, since it will be executed
with the figure as the context node.



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

 XSL-List info and archive:

Current Thread