You are the GREATEST!!! I've been messing with this for a week. Thank
you sooooo much!
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of
David
Carlisle
Sent: Thursday, December 11, 2003 11:06 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Numbering cross refs
The figure does have attribute ID
You still haven't shown any source code so it's not possible to really
help.
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
nothing.
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,
Add
<xsl:key name="ids" match="*[(_at_)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.
David
--
http://www.dcarlisle.demon.co.uk/matthew
________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Confidentiality Notice
The information contained in this e-mail is confidential and intended for use
only by the person(s) or organization listed in the address. If you have
received this communication in error, please contact the sender at O'Neil &
Associates, Inc., immediately. Any copying, dissemination, or distribution of
this communication, other than by the intended recipient, is strictly
prohibited.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list