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

All > Relax NG > Simplification - name attribute of element and attribute elements > Test 122

Previous sample | Next sample

Author: James Clark
Origin: Testsuite for Relax NG


ElementsAttributes
attributename |
elementname | ns |

ZVON comment: The attribute "bar" must be from null namespace, not "http://www.example.com".

Correct schema

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


Invalid document:
<eg:foo eg:bar="x" xmlns:eg="http://www.example.com" />

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