Friday, December 01, 2006

XML Schemas (XSD)

An xml schema define:
elements that appear in a document
attributes that can apprear in a document
define which elements are child elements
the order of child element
unmber of child elements
hether an element is empty or can include text
data types for elemt and attributes
default and fixed value for elements and attributes

Commond xml schema data types
xs: decimal
xs: integer
xs: boolean
xs: date
xs: time

XSD attributes
All attributes mus declare as simple types
Only complex element has attributes

Restriction are use to control acceptable values for XML elements or attributes. Restrictiions on XML elements are called facets.

XML Schema are extensible to future additions
Richer and more useful than DTDs
Written in XML --> manipulate schema with the XML DOM, transform your schema with XSLT
support datatype--> easier to describepermissible document content, valideate the correctness of data, define data facets, define data patterns, concert data between different data type
Support namespace

No comments: