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

All > Relax NG > Simplification - combine attribute > Test 187

Previous sample | Next sample

Author: James Clark
Origin: Testsuite for Relax NG


ElementsAttributes
definename |
elementname |
empty
grammar
refname |
start

ZVON comment: For each grammar element, all define elements with the same name are combined together. There must not be more than one define element with that name that does not have a combine attribute.

Incorrect schema

<grammar xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="http://relaxng.org/ns/structure/1.0" >
     <start>
          <ref name="x"/>
     </start>
     <define name="x">
          <element name="foo1">
               <empty/>
          </element>
     </define>
     <define name="x">
          <element name="foo2">
               <empty/>
          </element>
     </define>
</grammar>