Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Currently, the unique attribute of the attribute schema element will verify that the attribute is unique within the contributions.
Sometimes you need to guaratee uniqueness, but only within a partent element.
For instance, this set of rules:
<schema>
<element name="report">
<attribute name="id" required="true" unique="true" />
<element name="param">
<attribute name="id" required="true" unique="true"/>
</element>
</element>
</schema>
will error out on:
<report id="report1">
<param id="param1" />
<param id="param2" />
</report>
<report id="report1">
<param id="param1" />
</report>
It would be nice to guarantee that the above is allowed, while still prohibiting the following:
<report id="report1">
<param id="param1" />
<param id="param2" />
</report>
<report id="report1">
<param id="param1" />
<param id="param1" />
</report>