= General component schema Schematron rules =
This page concerns a proposal to extend the [source:/metadata/trunk/toolkit/general-component-schema.xsd general component schema] with a number of [http://www.schematron.com/ Schematron] rules to specify certain restrictions that cannot be expressed using plain XSD.
Currently a version of this extended schema can be found as a part of the testing resources of the CMDValidate library of the [[ComponentRegistryAndEditor|ComponentRegistry]]:
* [source:/ComponentRegistry/trunk/CMDValidate/src/test/resources/schema/general-component-schema.xsd general component schema extended with schematron rules]
== Restrictions ==
=== Sibling components or elements should all have a different name ===
{{{
#!xml
Sibling components or elements should all have a different name. Found multiple components or elements named ''!
}}}
=== Attribute name shouldn't be 'ref' or '!ComponentId' ===
{{{
#!xml
All attributes in an attribute list should have a different name. Found multiple attributes named ''!
Attribute name shouldn't be 'ref' or 'ComponentId', as these are used internally by CMD!
}}}
=== All items in an enumeration should be different ===
{{{
#!xml
All items in an enumeration should be different. Found multiple items with value ''!
}}}