Skip navigation links

Package com.sun.msv.grammar

abstract grammar model(AGM): common part.

See: Description

Package com.sun.msv.grammar Description

abstract grammar model(AGM): common part.

ID/IDREF support

Support for 'ID' and 'IDREF' types are implemented in this package, due to the restriction of the implementation.

The implementation in this package works as follows:

This implementation implies very severe limitations. For example, consider the following TREX pattern.

<element name="foo">
<choice>
<attribute name="bar" type="ID" />
<attribute name="bar" type="string" />
</choice>
<element name="child">
<attribute name="id" type="ID" />
</element>
</element>

And the following XML fragment.

<foo bar="xyz"> <child id="xyz" /> </foo>

This implementation cannot validate the above fragment, because "xyz" is registered as an ID when "bar" attribute is tested against "ID" type. IDREF type also has similar problems.

Note that RELAX prohibits these "abuse" of ID/IDREF in the way that this implementation works.

Skip navigation links

Copyright © 2016 Oracle Corporation. All rights reserved.