At 2002-05-12 16:03 +0200, Yonatan Mamou wrote:
>I have an XML document containing id/idref.
>When browsing the document, I would like to go from an element containing an
>IDREF to the element containing the ID.
>Is there a way to do it, using XSL
When building your HTML for browsing, create the <a name=""> from the
element containing the ID and create the <a href=""> from the element
containing the IDREF.
If you need to "go to" the element containing the ID while in your XSLT
stylesheet (not always the case), you will need to either:
(1) - create a key table using <xsl:key> to establish the nodes with
ID attributes and use the key() function to navigate to them with
your IDREF value
(2) - ensure that at least the ID/IDREF ATTLIST declarations for the
elements are in the instance's document type definition (model
group and other attributes need not be supplied) and use the
id() function to navigate to the ID elements
I hope this helps.
Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO: June 17-21, 2002
- : 3-days XML Information Modeling: July 31-August 2, 2002
G. Ken Holman mailto:[log in to unmask]
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/l/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6 Definitive XSLT and XPath
ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1 Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
Next public training: 2002-05-06,07,09,10,13,15,20,