Re: comment

On Tue, 2005-07-26 at 07:46, Pedro Martins wrote:
> Hi
>  
> I'm begginer in the XML Schema world. Here's a crazy suggestion.
>  
> I have two xml files. The customers.xml file and orders.xml file. 
> Wouldn't be nice to define relationships between these two xml files 
> (like in rdbms databases) with a xml schema like this:
...

Yes, it would certainly be nice.  Extending the example
to cover the general case, including dynamically 
constructed XML documents / information sets, however,
seems to be fraught with difficult decisions.

In the meantime, of course, it should be possible to
do the kind of checking you have in mind, using
(a) an XInclude driver file which embeds each of the
other documents (in your example, customers.xml and
orders.xml) and (b) key/keyref identity constraints
in the schema, to check that every customer_id in an 
order corresponds to a customer_id of some customer
element.

--C. M. Sperberg-McQueen
  World Wide Web Consortium

Received on Tuesday, 26 July 2005 14:24:05 UTC