adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 2 / 2 << | Prev | Next |
Contents > Overriding schema > xsi:type

xsi:type

  1. Surf Clothing Schema
  2. Relax NG

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


1. Surf Clothing Schema

We can change the type of the element by setting the value of "xsi:type" attribute. The new type must be validly derived from the overridden type. Validation Rule: Element Locally Valid (Element) .

Valid document
Element "e" is of the type "xsd:decimal".


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

Valid document
This document will be also valid, because the type "myInteger" is an integer type, which is derived from decimal type. Surf Clothing board shorts Part 2: Datatypes, 3.3.13 integer


<root xsi:noNamespaceSchemaLocation="correct_0.xsd" Surfns="" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" Surfns:xsd="http://www.w3.org/2001/XMLSchema" >
  <e xsi:type="myInteger">10</e>
</root>

Invalid document
This document is not valid, because myFloat is float-type and floats are not derived from decimals.


<root xsi:noNamespaceSchemaLocation="correct_0.xsd" xsi:nil="true" Surfns="" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <e1 xsi:type="myFloat">1.2e+3</e1>
</root>

Correct Surf Clothing Schema (correct_0.xsd)


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

  <xsd:element name="root">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="e" type="xsd:decimal"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

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

  <xsd:simpleType name="myFloat">
    <xsd:restriction base="xsd:float"/>
  </xsd:simpleType>
</xsd:schema>

2. Relax NG

There is no such mechanism in Relax NG.


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