You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Hookom, Jacob John" <ho...@uwec.edu> on 2002/11/26 03:19:34 UTC
ID/IDREF DocumentReader
How can I get IDREF linking if I read in an XML file (with proper dtd) as a DOM? Will using a Transformer link the nodes properly for me? Thus far I haven't found a way to get it to work.
Thanks!
Re: ID/IDREF DocumentReader
Posted by Joseph Kesselman <ke...@us.ibm.com>.
>How can I get IDREF linking if I read in an XML file (with proper dtd) as
a DOM?
If the DOM was built with validation turned on, so the DOM knows which
attributes are IDs, I believe we should be able to retrieve nodes by ID.
Just retrieve the IDREF's string value and pass it into the XPath id()
function (see http://www.w3.org/TR/xpath#section-Node-Set-Functions).
If the DOM was build with validation turned off, it doesn't know where and
what the IDs are and we don't either.
______________________________________
Joe Kesselman / IBM Research