[xsd-users] sequence copy and xsd:IDREF

Boris Kolpackov boris at codesynthesis.com
Thu Oct 30 14:10:58 EDT 2008


Hi Sumant,

Sumant Tambe <sutambe at dre.vanderbilt.edu> writes:

> Agreed that making copies of xml tree is wasteful but isn't copy also 
> supposed to have everything from the original? 

Yes, it is and it does. However, if you are copying only a sub-tree
you can't expect that it somehow will include a copy of the whole
tree.


> It should be indistinguishable from the original and therefore, even 
> IDREF should also be present. The IDREF I'm dereferencing points to 
> another book in the same sequence which is there in the copy as well.

Right, the book with the ID in question is in the sequence but the
root element via which it is logically "connected" to the book with 
IDREF is not. A copy of a sequence essentially is a collection of 
sub-trees that are not related to each other. Think of it as a 
collections of XML documents instead of just one document. You
wouldn't expect IDREF in one document to reference ID in another.

Boris




More information about the xsd-users mailing list