ZVON > Tutorials > XML Schema and Relax NG Tutorial |
Intro / Search / ZVON |
Index | >> Example 1 / 4 << | Prev | Next | |
Please, send all comments, bug-reports, and contributions to Jiri.Jirat@systinet.com. Thank you very much.
XML Schema keys: elementFormDefaultLet us imagine the simplest case. The attribute "elementFormDefault" is useless here, because it has no impact on top-level element definitions. ( 3.3.2 XML Representation of Element Declaration Schema Components ).
Valid document <root xsi:noNamespaceSchemaLocation="correct_0.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > test </root> |
Correct XML Schema (correct_0.xsd) <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" > <xsd:element name="root" type="xsd:string"/> </xsd:schema> |
The attribute "elementFormDefault" is useless here, so the result is the same as above.
Valid document <root xsi:noNamespaceSchemaLocation="correct_0.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > test </root> |
Correct XML Schema (correct_0.xsd) <xsd:schema elementFormDefault="unqualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" > <xsd:element name="root" type="xsd:string"/> </xsd:schema> |