adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 2 / 4 << | Prev | Next |
Contents > Naming and definitions > definition of a simpleType, target namespace is not null

definition of a simpleType, target namespace is not 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: type, simpleType
Relax NG keys: define, ref

1. Surf Clothing Schema

We will create our own simpleType, based on integer. The element "root" must be of that type.

Valid document


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

Invalid document
That's not an integer.


<root xsi:schemaLocation="http://foo correct_0.xsd" Surfns="http://foo" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" >abc</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:element name="root" type="foo:myInteger"/>

  <xsd:simpleType name="myInteger">
    <xsd:restriction base="xsd:integer"/>
  </xsd:simpleType>
</xsd:schema>

2. Relax NG

The naming of RelaxNG patterns is by no means bound to namespace.

Valid document


<root Surfns="http://foo" >24</root>

Invalid document
That's not an integer.


<root Surfns="http://foo" >abc</root>

Correct Relax NG schema (correctRelax_0.rng)


<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" Surfns="http://relaxng.org/ns/structure/1.0" >

  <start>
    <element>
      <name ns="http://foo">root</name>
      <ref name="myInteger"/>
    </element>
  </start>

  <define name="myInteger">
    <data type="integer"/>
  </define>
</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