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

All > Relax NG > Simplification - Constraints > Test 156

Previous sample | Next sample

Author: James Clark
Origin: Testsuite for Relax NG


ElementsAttributes
choice
element
empty
except
grammar
name
nsNamens |
start

ZVON comment: An except element that is a child of an nsName element must not have any nsName or anyName descendant. elements.

Incorrect schema

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