xml3 Schemas2

xml3 Schemas2 - 1 Schemas Outline Introduction...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Schemas Outline Introduction Schemas vs. DTDs W3C XML Schema Microsoft XML Schema: Describing Elements Describing Attributes Data types Case Study: Writing a Microsoft XML Schema for the Day                 Planner Application
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Objectives Define Schema Differentiate between DTD and XSD Describe element declarations within Schema
Background image of page 2
3 Schema is: Next generation of DTDs Simple text file Can be separate file Can be embedded within the XML file XML Schema is an XML based alternative to DTD. An XML schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD).
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 XML Schema Anatomy: defines elements that can appear in a document defines attributes that can appear in a document defines which elements are child elements defines the order of child elements defines the number of child elements defines whether an element is empty or can include text defines data types for elements and attributes defines default and fixed values for elements and attributes
Background image of page 4
5 XML Schemas are the Successors of DTDs Here are some reasons: XML Schemas are extensible to future additions XML Schemas are richer and more useful than DTDs XML Schemas are written in XML XML Schemas support data types XML Schemas support namespaces
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 XML Schema has Support for Data Types It is easier to describe permissible document content It is easier to validate the correctness of data It is easier to work with data from a database It is easier to define data facets (restrictions on data) It is easier to define data patterns (data formats) It is easier to convert data between different data types
Background image of page 6
7 XML Schemas use XML Syntax You don't have to learn another language You can use your XML editor to edit your Schema files You can use your XML parser to parse your Schema files You can manipulate your Schema with the XML DOM You can transform your Schema with XSLT
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 XML Schemas are Extensible Reuse your Schema in other Schemas Create your own data types derived from standard types Reference multiple schemas from the same document
Background image of page 8
9 Basic principles Datatypes –used as basis of all the larger components Structures- used to describe the element, attribute and validation structure Definition – create new types Declarations- describes the content models of elements and attributes in document
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Simple   Element A simple element is an XML element that can contain only text. It cannot contain any other elements or attributes. The syntax for defining a simple element is: <xs:element name="xxx" type="yyy"/>
Background image of page 10
11 Here are some XML elements: <lastname>Steven</lastname> <age>34</age> <dateborn>1968-03-27</dateborn>
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 And here are the corresponding simple element definitions: <xs:element name="lastname" type="xs:string"/ > <xs:element name="age" type="xs:integer"/> <xs:element name="dateborn" type="xs:date"/>
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 54

xml3 Schemas2 - 1 Schemas Outline Introduction...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online