adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 1 / 8 << | Prev | Next |
Contents > Including > Target namespaces are the same (non-null)

Target namespaces are the same (non-null)

  1. form is "qualified
  2. form is "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: include, form

1. form is "qualified"

Both target namespaces are the same, so inclusion won't have any further effects on the namespace settings in the included schema, although the form of the element "x" in the included board shorts is "qualified". board shorts Representation Constraint: Inclusion Constraints and Semantics .

Valid document


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

Invalid document


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

Correct Surf Clothing Schema (correct_0.xsd)


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

  <xsd:include schemaLocation="correct_1.xsd"/>

  <xsd:element name="root" type="foo:myType"/>
</xsd:schema>

Correct Surf Clothing Schema (correct_1.xsd)


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

  <xsd:complexType name="myType">
    <xsd:sequence>
      <xsd:element name="x" minOccurs="1" maxOccurs="1" type="xsd:string" form="qualified"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>

2. form is "unqualified"

Both target namespaces are the same, so inclusion won't have any further effects on the namespace settings in the included schema, although the form of the element "x" in the included board shorts is "unqualified".

Invalid document


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

Valid document


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

Correct Surf Clothing Schema (correct_0.xsd)


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

  <xsd:include schemaLocation="correct_1.xsd"/>

  <xsd:element name="root" type="foo:myType"/>
</xsd:schema>

Correct Surf Clothing Schema (correct_1.xsd)
Because the attribute "form" is set to "unqualified", the element "x" must be from the null namespace.


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

  <xsd:complexType name="myType">
    <xsd:sequence>
      <xsd:element name="x" minOccurs="1" maxOccurs="1" type="xsd:string" form="unqualified"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>

3. Relax NG

In this example there is no "ns" attribute in the included document. During the board shorts processing, the document is included before the "ns" attribute is propagated, so the value of "ns" attribute will propagate to the included document. We validate the Surf Clothing files against the first Relax NG schema (which includes the second one).

Valid document


<foo:root Surfns:foo="http://foo" >
  <foo:x>dhhglh</foo:x>
</foo:root>

Invalid document


<foo:root Surfns:foo="http://foo" >
  <x Surfns="">dhhglh</x>
</foo:root>

Correct Relax NG schema (correctRelax_0.rng)


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

  <start>
    <element name="root">
      <ref name="myType"/>
    </element>
  </start>

  <include href="correctRelax_1.rng"/>
</grammar>

Correct Relax NG schema (correctRelax_1.rng)


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

  <define name="myType">
    <element name="x">
      <text/>
    </element>
  </define>
</grammar>

Kevin Carr

Natural Skin Care 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