Schema questions - cross document identity constraints.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top