key, keyref, min, max, .... and so on

Hi everybody,
Another question about <key> and <keyref> constructs. Well, let's look
at the following XML doc

<doc>
    <A a='1'>
        <B>one</B>
        <B>two</B>
        <B>three</B>
        <B>three</B>
        <B>three</B>
    </A>
    <B>one</B>
    <B>two</B>
    <B>three</B>
    <B>four</B>
    <B>five</B>
</doc>

In the schema, the content of <B> which is the child of <doc> is a key,
called BKey for example. And the content of <B> which is the child of
<A> is a keyref  referencing  the key BKey. In the declaration of <B> as
a child of A, min and max Occurs could be used to indicate the number of
<B> referenced. In our example, maxOccurs of <B> child of <A> is >= 5.
My question is the following;
Is it possible to restrict the number of <A> element referencing <B> the
child of <doc>? For example, three <B> elements in <A> are referencing
the same <B>three<B> (child of <doc>). Is it possible to say that for
each <B> appearing in <doc>,  it is referenced at least by one <A>
element and at most by 2 <A> elements? A kind of min and max Occurs for
referenced elements and not for referencing elements.
Any help is wellcome.
thanks all
Hamid Maran

Received on Friday, 9 November 2001 04:12:26 UTC