Eliza Khosrova wrote:
> I have an xml file that contains two elements:
> First one with an ID attribute set to something, e.g. "C0000"
> and second element that has an attribute whose value is a
> link to first element via IDREF.
> When I run this xml file with both elements in 1 file, it
> works and I see the link and everything.
> Now, I need to put these two elements in two different xml
> files and make it still work, e.g. file1.xml and file2.xml
> where file1.xml contains 1st element and file2.xml contains
> 2nd element.
As Wendell pointed out earlier, ID and IDREF aren't intended to
support cross-document linking. The values of ID type attributes are only
required to be unique within a single document and the syntax for
referencing these values doesn't provide a means of identifying a location
external to the document.
However, this doesn't leave you totally out in the cold. The W3C has
addressed this problem in the form of the XML Linking Language (XLink).
Without knowing exactly what it is you're trying to do, it's probably safe
to assume that your needs will be addressed by researching this area. You
can find out more about XLink here: http://www.w3.org/XML/Linking, check out
the resources they've linked up for other specs and tool support at
Michael A. Rossi
Computer Sciences Corporation
mailto:[log in to unmask]