Schema questions - cross document identity constraints.

Discussion in 'XML' started by Russell Thamm, Feb 10, 2004.

  1. 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
     
    Russell Thamm, Feb 10, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Scharber

    validating identity constraints

    Michael Scharber, Aug 25, 2003, in forum: XML
    Replies:
    0
    Views:
    481
    Michael Scharber
    Aug 25, 2003
  2. Yuraukar
    Replies:
    0
    Views:
    358
    Yuraukar
    Dec 18, 2003
  3. Olaf Meyer
    Replies:
    2
    Views:
    720
    Olaf Meyer
    Jan 15, 2004
  4. Olaf Meyer

    XML schema uniqueness constraints

    Olaf Meyer, Jan 15, 2004, in forum: XML
    Replies:
    0
    Views:
    519
    Olaf Meyer
    Jan 15, 2004
  5. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,333
    Stanimir Stamenkov
    Apr 25, 2005
Loading...

Share This Page