R
Russell Thamm
Hi,
my application uses several XML documents.
I want to know if there is any way to define identity constraints
across documents.
eg
Doc A
-----
<xxx-objects>
<xxx-object id="fred"/>
<xxx-object id="james"/>
<xxx-object id="charley"/>
</xxx-objects>
Doc B
-----
<yyy-objects>
<yyy-object id="red" xxx="fred"/>
<yyy-object id="yellow" xxx="james"/>
</yyy-objects>
The allowable values of attribute xxx (yyy-object) are as defined
in document A.
If A and B were a single document, it is relatively simple to define Identity
Constraints.
The only idea that I have to handle this is:
1) Parse all the documents used by an application.
2) Construct a single DOM document from these.
3) Write out the single document. (Xerces-c can't validate data in a DOM tree)
4) Parse this single document checking against my schema.
This seems pretty messy.
It also means that many schema types will be used in at least two documents.
Are there better solutions to this problem?
Is there any good documentation that discusses issues like this?
thanks
Russell Thamm
my application uses several XML documents.
I want to know if there is any way to define identity constraints
across documents.
eg
Doc A
-----
<xxx-objects>
<xxx-object id="fred"/>
<xxx-object id="james"/>
<xxx-object id="charley"/>
</xxx-objects>
Doc B
-----
<yyy-objects>
<yyy-object id="red" xxx="fred"/>
<yyy-object id="yellow" xxx="james"/>
</yyy-objects>
The allowable values of attribute xxx (yyy-object) are as defined
in document A.
If A and B were a single document, it is relatively simple to define Identity
Constraints.
The only idea that I have to handle this is:
1) Parse all the documents used by an application.
2) Construct a single DOM document from these.
3) Write out the single document. (Xerces-c can't validate data in a DOM tree)
4) Parse this single document checking against my schema.
This seems pretty messy.
It also means that many schema types will be used in at least two documents.
Are there better solutions to this problem?
Is there any good documentation that discusses issues like this?
thanks
Russell Thamm