adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 4 / 4 << | Prev | Next |
Contents > elementFormDefault - elements > elementFormDefault qualified for not-top-level elements, namespace non-null

elementFormDefault qualified for not-top-level elements, namespace non-null

  1. Surf Clothing Schema
  2. Relax NG

Please, send all comments, bug-reports, and contributions to Jiri.Jirat@systinet.com. Thank you very much.

Surf Clothing board shorts keys: elementFormDefault
Relax NG keys: ns

1. Surf Clothing Schema

Because the attribute "elementFormDefault" is set to "qualified", the child must be from the namespace "http://foo" (from the "targetNamespace").

Valid document


<root xsi:schemaLocation="http://foo correct_0.xsd" Surfns="http://foo" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <e1>Element 1</e1>
</root>

Invalid document
The following document is not valid.


<root xsi:schemaLocation="http://foo correct_0.xsd" Surfns="http://foo" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <e1 Surfns="">Element 1</e1>
</root>

Correct Surf Clothing Schema (correct_0.xsd)


<xsd:schema targetNamespace="http://foo" elementFormDefault="qualified" Surfns:xsd="http://www.w3.org/2001/XMLSchema" Surfns:foo="http://foo" >

  <xsd:element name="root">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="e1" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

2. Relax NG

We can set the namespace for all elements using the "ns" attribute. The value is inherited and now all elements must be from the "http://foo" namespace.

Valid document


<root Surfns="http://foo" >
  <e1>Element 1</e1>
</root>

Correct Relax NG schema (correctRelax_0.rng)


<grammar ns="http://foo" Surfns="http://relaxng.org/ns/structure/1.0" >

  <start>
    <element>
      <name>root</name>
      <element>
        <name>e1</name>
        <text/>
      </element>
    </element>
  </start>
</grammar>

Kevin Carr in Stanton

Natural Skin Care and European Soaps
Kevin Carr
Mayor Dave Shawver Stanton
Internetusers


You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks