OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Specifying Complex ID/Key/Unique reference Constraints Using XML schema

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: Specifying Complex ID/Key/Unique reference Constraints Using XML schema
  • From: "=?gb2312?q?Michael=20T.?=" <yj_t@yahoo.com>
  • Date: Mon, 13 Oct 2003 20:15:01 +0800 (CST)

Hi All,
I'm new here, and I am looking for a solution to specify the following ID Constraint using XML schema:
Within the following xml:
        <item id="a">
        <item id="b">
        <item id="c">
        <item id="d">
        <item id="e">
        <item id="f">
        <item id="g">
        <item id="h">
        <reference refs="a b d">  <!-- correct, referencing only items in "groupA" ! -->
        <reference refs="a d c e"> <!-- error, referencing not only items "groupA" but also in "groupB" ! -->
As you can see from the comments, I would like to enforce a role that says:
the "refs" attribute in the "reference" element under the "groupC" element is a list of references, and they must reference the "id" attribute of the "item" element ONLY under the "groupA" element.
The biggest headache for me now is the "ONLY" thing, how to reflect this using XML schema? Could any one give me a hint? Thanks in Advance!

Do You Yahoo!?


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS