V
Victor Engmark
How do I define that the contents of an element should be unique only in
a sub-tree of the whole XML file?
In my case, I have several documents, each containing several files. The
file names have to be unique only within each document. I.e., the
following is valid:
<doc>
<file>AAA</file>
<file>BBB</file>
</doc>
<doc>
<file>AAA</file>
</doc>
, while the following is not:
<doc>
<file>AAA</file>
<file>BBB</file>
<file>AAA</file> <!-- Matches previous file! -->
</doc>
a sub-tree of the whole XML file?
In my case, I have several documents, each containing several files. The
file names have to be unique only within each document. I.e., the
following is valid:
<doc>
<file>AAA</file>
<file>BBB</file>
</doc>
<doc>
<file>AAA</file>
</doc>
, while the following is not:
<doc>
<file>AAA</file>
<file>BBB</file>
<file>AAA</file> <!-- Matches previous file! -->
</doc>