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

All > Relax NG > other > Test 125

Previous sample | Next sample

Author: James Clark
Origin: Testsuite for Relax NG


ElementsAttributes
elementns |
empty
group
name

ZVON comment: If the name element does not have any ns attribute, then the attribute is inherited from its ancestor which has ns attribute (if any, otherwise it is empty string).

Correct schema

<group xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="http://relaxng.org/ns/structure/1.0" >
     <element ns="http://www.example.com">
          <name>foo</name>
          <empty/>
     </element>
</group>


Valid document:
<foo xmlns="http://www.example.com" />

Invalid document:
<foo/>