26.01.2019 Views

XML Simplified

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Module 4<br />

<strong>XML</strong> Schema<br />

4.4.2 Datatypes Used with Simple Types<br />

Elements of simple type tend to describe the content and the datatype of a document, rather than its<br />

structure.<br />

Concepts<br />

In <strong>XML</strong> Schema, one can mention the type of data an element can contain by assigning it a particular<br />

simple type definition. So, based upon the type of data it supports, <strong>XML</strong> schema divides the elements of<br />

simple types into two broad categories:<br />

‣ ¾ built-in simple type<br />

‣ ¾ user-defined simple type<br />

4.4.3 Built-in Simple Types<br />

There are several built-in simple types, such as integer, date, float and string that one can use without<br />

further modifications.<br />

A built-in simple element can contain a default value or a fixed value. A 'default' value is the value that is<br />

assigned automatically to the element when no other value has been specified. A 'fixed' value is assigned<br />

to an element, when there is no need to change the value for that element. Figure 4.7 depicts built-in<br />

simple types.<br />

Figure 4.7: Built-in Simple Types<br />

<strong>XML</strong> <strong>Simplified</strong><br />

Version 1.0 © Aptech Limited

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!