adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 8 / 8 << | Prev | Next |
Contents > Including > Including in Relax NG - include element, ns attribute

Including in Relax NG - include element, ns attribute

  1. Relax NG - no "ns" attribute in included document
  2. Relax NG - "ns" attribute in included document

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

Relax NG keys: include

1. Relax NG - no "ns" attribute in included document

When using the "include" element, the included file must have the "grammar" root element. 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). See include element.

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>

2. Relax NG - "ns" attribute in included document

In this example the "ns" attribute is set to null-namespace 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" >
  <x Surfns="">dhhglh</x>
</foo:root>

Invalid document


<foo:root Surfns:foo="http://foo" >
  <foo:x>dhhglh</foo: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 ns="" Surfns="http://relaxng.org/ns/structure/1.0" >

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

Kevin Carr in Stanton

Natural Skin Care and European Soaps
TickTalk 5
city of 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