- From: Costello, Roger L. <costello@mitre.org>
- Date: Wed, 22 Jul 2009 13:57:55 -0400
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Hi Michael,
> A schema for XSLT, for example, might enforce a rule that
> XSLT templates must have either a name or a match attribute
> by declaring the xsd:template element thus:
>
> <element name="template">
> <alternative test="@name" type="xslt:named-template"/>
> <alternative test="@match" type="xslt:template"/>
> <alternative type="xsd:error"/>
> </element>
Doesn't this achieve the same result (I simply omitted the third alternative):
<element name="template">
<alternative test="@name" type="xslt:named-template"/>
<alternative test="@match" type="xslt:template"/>
</element>
In this version an error is generated if there is neither a name attribute or a match attribute.
I like this one:
> <override schemaLocation="main.path.to.V">
> <element name="E" type="error"/>
> <!--* other elements can be excluded here by the same
> * method ... *-->
> </override>
Thanks.
/Roger
Received on Wednesday, 22 July 2009 17:58:32 UTC