RELAX: Schemas Don't Have to be Hard
Please turn off all
What are Schemas?
About RELAX NG
What's Wrong with DTDs?
What's Wrong with W3C XML Schema Language?
greeting.xml
greeting.rng
Validating the document with Jing
An Invalid Document
Checking the Invalid Document
RELAX NG Validators
The compact syntax: greeting.rnc
Questions?
A More Complex Document
A More Complex Schema
Groups
A More Flexible Schema
A Couple of Notes
Questions?
Element Content
Nested structures
Sharing Content Models
When Order Doesn't Matter
interleave
Mixed Content
Declaring Mixed Content
Questions?
Choices
Groups
A Document with Attributes
Declaring Attributes
Enumerations
Questions?
Namespaces
Default Namespace
A Schema for a Document that uses Namespaces
A Prefixed Schema for a Document that uses Namespaces
Namespaces on Attributes
Attaching a namespace to an attribute
Questions?
Data Typing
Possible types
RELAX NG type libraries
data element
Primitive Data Types for Schemas
Numeric Data Types for Schemas
Time Data Types for Schemas
XML Data Types for Schemas
Assorted Data Types for Schemas
Questions?
Restricting types
Facets
Length Facets: length, minLength, maxLength
Facets for ordered items: minExclusive, maxExclusive, minInclusive, maxInclusive
Facets for decimal numbers: totalDigits and fractionDigits
Adding a Price
The pattern facet
Regular Expressions
The Price Schema
Lists
Questions?
User defined type libraries
Prime Datatype
Prime Datatype Library
Prime Datatype Library Factory
Locating type libraries
An invalid document
A Prime schema
Questions?
include element
externalref element
Pointing to the XHTML schema
Annotations
RELAX NG in Java 1.5/JAXP 1.3
Questions?
Other features
What RELAX NG doesn't do
RELAX NG is being used for
Trang
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2005-2007 Elliotte Rusty Harold
Last Modified January 22, 2007