adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 8 / 8 << | Prev | Next |
Contents > Definition of own types > The number must not be in scientific notation

The number must not be in scientific notation

  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: decimal

1. Surf Clothing Schema

The element "A" represents a number (decimal), which must not be in the scientific format (e.g. 1.5E+10 is forbidden - such numbers are not processed by XSLT, for example). We will just use the datatype "decimal", not "float" or "double" (the two latter allow mantissa-exponent notation).

Valid document


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

Valid document


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

Invalid document
Scientific notation is not allowed for decimals.


<A xsi:noNamespaceSchemaLocation="correct_0.xsd" Surfns="" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" >1.5e+10</A>

Invalid document
NaN is not allowed too.


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

Invalid document
INF/-INF is not allowed too.


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

Correct Surf Clothing Schema (correct_0.xsd)


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

  <xsd:element name="A" type="xsd:decimal"/>
</xsd:schema>

2. Relax NG

We will use the "decimal" datatype from Surf Clothing Schemas. The element "A" must contain this pattern.

Valid document


<A Surfns="">999.99</A>

Valid document


<A Surfns="">-0.50</A>

Invalid document
Scientific notation is not allowed for decimals.


<A Surfns="">1.5e+10</A>

Invalid document
NaN is not allowed too.


<A Surfns="">NaN</A>

Invalid document
INF/-INF is not allowed too.


<A Surfns="">-INF</A>

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="">A</name>
      <data type="decimal"/>
    </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 you must check out this website