Next in thread → Next in month →

Re: determinism and attributes

From
Kohsuke KAWAGUCHI <>
Date
2001-06-19T18:00:52+00:00
ID
Thread
Re: determinism and attributes
> Does determinism relate only to elements or does it take
> attributes or other content into consideration as well?

All but key/keyref can be ambiguous and non-deterministic.

1) You can make elements ambiguous

<choice>
    <element name="A">
        <data type="positiveInteger"/>
    </element>
    <element name="A">
        <data type="integer"/>
    </element>
</choice>

2) You can make attributes ambiguous

... just change <element>s of the above examples to <attribute>s.

3) You can make data/value/text ambiguous

<choice>
    <text/>
    <data type="integer"/>
</choice>

or

<choice>
    <value type="integer"> 5 </value>
    <data type="integer"/>
</choice>

4) But you CAN'T make key/keyref ambiguous

The following pattern is wrong:

<choice>
    <data type="integer" key="symbolSpace1"/>
    <data type="positiveInteger"/>
</choice>

The following pattern is also prohibited, to make ambiguity detection
simple.

<choice>
    <data type="positiveInteger" key="symbolSpace1"/>
    <data type="negativeInteger"/>
</choice>


regards,
--
Kohsuke KAWAGUCHI                          +1 650 786 0721
Sun Microsystems                   
Next in thread → Next in month →