ZVON > References > Zvon Example Repository
Example repository: index | categories | search

All > Relax NG > Simplification - Constraints > Test 160

Previous sample | Next sample

Author: James Clark
Origin: Testsuite for Relax NG


ElementsAttributes
anyName
definename |
elementname |
empty
except
grammar
start

ZVON comment: An except element that is a child of an anyName element must not have any anyName descendant elements, even the definition is unreachable.

Incorrect schema

<grammar xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="http://relaxng.org/ns/structure/1.0" >
     <start>
          <element name="foo">
               <empty/>
          </element>
     </start>
     <define name="bar">
          <element>
               <anyName>
                    <except>
                         <anyName/>
                    </except>
               </anyName>
               <empty/>
          </element>
     </define>
</grammar>