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. Advertisements

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. Markus
    Replies:
    1
    Views:
    1,920
    Markus
    Nov 23, 2005
  2. Michael Scharber

    validating identity constraints

    Michael Scharber, Aug 25, 2003, in forum: XML
    Replies:
    0
    Views:
    539
    Michael Scharber
    Aug 25, 2003
  3. Yuraukar
    Replies:
    0
    Views:
    435
    Yuraukar
    Dec 18, 2003
  4. Olaf Meyer
    Replies:
    2
    Views:
    867
    Olaf Meyer
    Jan 15, 2004
  5. Olaf Meyer

    XML schema uniqueness constraints

    Olaf Meyer, Jan 15, 2004, in forum: XML
    Replies:
    0
    Views:
    604
    Olaf Meyer
    Jan 15, 2004
  6. Kimmo J?rvikangas

    XML Schema <choice> constraints

    Kimmo J?rvikangas, Jun 18, 2004, in forum: XML
    Replies:
    3
    Views:
    2,244
    Kimmo J?rvikangas
    Jun 18, 2004
  7. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,565
    Stanimir Stamenkov
    Apr 25, 2005
  8. Karl Uppiano
    Replies:
    3
    Views:
    3,521
    j4jackycheng
    Aug 2, 2009
Loading...