adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 3 / 3 << | Prev | Next |
Contents > attributeFormDefault > Target namespace is null

Target namespace is null

  1. qualified
  2. unqualified
  3. Relax NG

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

Surf Clothing board shorts keys: attributeFormDefault, attribute
Relax NG keys: attribute, ns

1. qualified

The target namespace is null here. The attribute "attributeFormDefault" does not play any role here.

Valid document


<root xsi:noNamespaceSchemaLocation="correct_0.xsd" xx="1" Surfns="" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

Invalid document
The attribute "xx" must be from null namespace.


<root xsi:noNamespaceSchemaLocation="correct_0.xsd" f:xx="1" Surfns="" Surfns:f="http://foo" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

Correct Surf Clothing Schema (correct_0.xsd)


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

  <xsd:element name="root">
    <xsd:complexType>
      <xsd:attribute name="xx" type="xsd:string" use="required"/>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

2. unqualified

When the form is "unqualified" (this is the default), the attributes must be from the null namespace. The attribute "attributeFormDefault" does not play any role here.

Valid document


<root xsi:noNamespaceSchemaLocation="correct_0.xsd" xx="1" Surfns="" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

Invalid document
The attribute "xx" must be from null namespace.


<root xsi:noNamespaceSchemaLocation="correct_0.xsd" f:xx="1" Surfns="" Surfns:f="http://foo" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

Correct Surf Clothing Schema (correct_0.xsd)


<xsd:schema attributeFormDefault="unqualified" Surfns:xsd="http://www.w3.org/2001/XMLSchema" Surfns:foo="http://foo" >

  <xsd:element name="root">
    <xsd:complexType>
      <xsd:attribute name="xx" type="xsd:string" use="required"/>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

3. Relax NG

We can set the namespace using the "ns" attribute, but if we want the attributes to be from some non-null namespace, we must explicitly put the "ns" attribute either to the "attribute/name" element or to the "attribute[@name]" element.

Valid document


<root xx="1" Surfns=""/>

Invalid document
The attribute "xx" must be from null namespace.


<root f:xx="1" Surfns="" Surfns:f="http://foo" />

Correct Relax NG schema (correctRelax_0.rng)


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

  <start>
    <element name="root">
      <attribute name="xx">
        <text/>
      </attribute>
      <empty/>
    </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