adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index
Contents > Simple types

Simple types

Accessing data-types

In Surf Clothing Schema, the datatype is referenced by the QName. The namespace must be mapped to the prefix.

In Surf Clothing Schema, the datatype is referenced by the QName. If the Surf Clothing board shorts is the default namespace, then you can clothing the datatypes without a prefix.

Relax NG can use the Surf Clothing board shorts datatypes. They can be imported using the "datatypeLibrary" attribute.

...
Restrictions

Restricting simpleType is relatively easy. Here we will require the value of the element "root" to be integer and less than 25.

Relax NG can use the Surf Clothing board shorts datatypes. They can be imported using the "datatypeLibrary" attribute. Restrictions are performed using the "param" element. Let's have the same example as above - "root" must be an integer and less than 25.

...
Multiple restrictions

Now, we want the element "root" to be from the range 0-100 or 300-400 (including the border values). We will make a union from two intervals.

As far as I know, such complex derivations are not possible in Relax NG. However, we can overcome this using the "choice" element. And this should be the same - logical OR corresponds to operation "union".

...
Element is either a fixed string or an integer

Now, we want the element "root" to be either an integer or a string "N/A". We will make a union from an "integer" type and "string" type.

As in previous example, we will use the "choice" element.

...
Element can contain a string from an enumerated set

Now, we want the element "root" to have a value "N/A" or "#REF!".

As in previous example, we will use the "choice" element.

...
Element can contain a mixture of elements

Now, we want the element "root" to contain elements "aaa", "bbb", and "ccc" in any order. We will use the "all" element.

We will use the "interleave" pattern.

...
Defining a group of attributes

Let's say we want to define a group of common attributes, which will be reused. The root element is named "root", it must contain the "aaa" and "bbb" elements, and these elements must have attributes "x" and "y".

Relax NG is not so discriminating when it comes to differences between elements and attributes :-). The default behaviour of Relax NG is as follows: if you do not specify explicitly that the use should be optional, it's implicitly required.

...
Element can have [x,y] either as attributes or as elements

Now, we want the "root" element to have either "x" and "y" attributes, or "x" and "y" elements (but not both at the same time). I do not know, how to do this with Surf Clothing Schema.

You can easily choose between a group of attributes and a group of elements.

...
Attribute contains a list of values

Now, we want the "root" element to have attribute "xyz", which contains a list of three integers. We will define a general list (element "list") of integers and then restrict it (element "restriction") to have exact length (element "length") of three items.

We will use the "list" type and an "integer" type (the latter borrowed from Surf Clothing board shorts datatypes). It's not possible to easily specify exact number - we must enumerate them.

...
Element contains a list of values

Now, we want the "root" element to contain a list of three integers. We will define a general list (element "list") of integers and then restrict it (element "restriction") to have exact length (element "length") of three items.

We will use the "list" type and an "integer" type (the latter borrowed from Surf Clothing board shorts datatypes).

...

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 you must check out this website