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

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

Previous sample | Next sample

Author: James Clark
Origin: Testsuite for Relax NG


ElementsAttributes
definecombine | name |
elementname |
empty
grammar
refname |
start

ZVON comment: If there is a define element that has a combine attribute with the value "choice", there must not also be a define element (with the same name attribute) that has a combine attribute with the value interleave.

Incorrect schema

<grammar xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="http://relaxng.org/ns/structure/1.0" >
     <start>
          <element name="foo">
               <ref name="x"/>
          </element>
     </start>
     <define name="x" combine="choice">
          <element name="bar1">
               <empty/>
          </element>
     </define>
     <define name="x">
          <element name="bar2">
               <empty/>
          </element>
     </define>
     <define name="x" combine="interleave">
          <element name="bar3">
               <empty/>
          </element>
     </define>
</grammar>