About the Book
With the successful implementation of XML Schema, developers are learning how to increase productivity, improve software reliability, minimize development time, and decrease time to market. This in-depth reference is an all-in-one resource designed to help developers leverage the power and potential of XML schemas by offering a complete roadmap to their creation, design, and use.This authoritative reference and tutorial is filled with practical insights and detailed examples. The book begins by providing a conceptual introduction to XML Schema. From there, coverage shifts to the W3C Schema Recommendation and how to apply schemas to specific business goals. The authors provide insight and instruction throughout on integrating XML schemas into existing technologies such as .NET, Java, Visual Basic, Oracle, and more. The book concludes with a complete case study designed to reinforce and illustrate material covered.Additional topics include:Applications for schemasSimple and complex typesXML schema processing and validationNamespaces in XMLUsing schemas with DOM and SAXXML schema document syntaxXML Information SetsXML Schema applications of XPathWhether designing a schema from scratch or integrating schemas into contemporary technologies, The XML Schema Complete Reference is the most complete and definitive sourcebook available for the XML Schema environment.
0672323745B08162002
Table of Contents:
Preface.
Acknowledgments.
I. XML SCHEMA OVERVIEW.
1. Introduction.
Why XML?
Why XML Schemas?
What Is an XML Schema Document?
Benefits of an XML Schema.
Drawbacks of an XML Schema.
The World Wide Web Consortium (W3C) Recommendations.
The XML Recommendation.
The Namespace Recommendation.
The Infoset Recommendation.
The XPath Recommendation.
The Schema Recommendation.
Object-oriented Concepts.
Unifying Terminology.
Important Terminology Used in This Book.
Schema Values.
Parallel Concepts and Ignoring Differences.
Element Terminology.
Element Type Terminology.
Other Terminology to Expect in This Book.
Thematic Examples.
Thematic Example Quality.
Creating an XML Schema Document.
Editing an XML Schema Document.
Validating an XML Instance.
Typesetting Conventions.
Online Resources.
2. XML Processing.
Basics.
Entity Managers.
Parsers and Lexical Analyzers.
Validators.
Parsing Events, Information Sets, and Applications.
XML Structure Before and After Parsing.
XML Documents.
The XML Information Set.
The DOM.
Schema Processing.
Processing an XML Schema Document.
What Does a Schema Processor Add? The PSVI.
3. XML Namespaces.
Uniform Resource Names and Uniform Resource Locators.
Creating URIs.
Using RDDL with Namespace URLs.
Namespace Components.
Declaring Namespaces.
Qualified Names and QNames.
Qualified Names as Values.
Namespace Scoping.
XML Schema and Namespaces.
4. XPath and XPointer.
XPath.
XPath Location Paths.
Predicates.
Node IDs.
Using XPath with Identity Constraints.
XPointer.
Location Sets.
Namespaces.
Subelement Sequences.
XPointer Extensions to XPath.
Using XPointer and XPath to Locate Schemas.
5. The Structure of Documents and Schemas.
XML Documents.
The XML Information Set.
The Document Information Item Class.
The Element Information Item Class.
The Attribute Information Item Class.
The Character Information Item Class.
XML Information Set Summary.
Introduction to the PSVI.
Introduction to Schemas.
Schema Documents.
II. CREATING XML SCHEMA DOCUMENTS.
6. Overview of an XML Schema Document.
The Enclosing Schema Element.
Namespaces.
The Default Namespace.
The Target Namespace.
Namespaces and the XML Instance.
Scope.
Global Components.
Local and Anonymous Components.
Annotating Elements.
Constraining Elements.
Simple Content.
Constraining Attributes.
Simple Attribute Values.
Named Attribute-use Groups.
Attribute Wildcards.
Simple Types.
Built-in Datatypes.
Deriving Simple Types by Restriction.
Constraining Facets.
Lists.
Unions.
Complex Types.
Simple Content.
Complex Content.
Deriving Complex Types by Extension.
Deriving Complex Types by Restriction.
Blocking Complex Types.
Model Groups.
The All Model Group.
The Choice Model Group.
The Sequence Model Group.
The Named Model Group.
Substitution Groups.
Instantiability.
Identity Constraint Definitions.
Notations.
Imports and Includes.
Locating XML Schemas and XML Schema Components.
Schema Element IDs.
7. Creating an XML Schema Document.
A Simple XML Schema Document Example.
A Schema Element with Every Attribute.
Concepts and Observations.
Attributes of a Schema Element.
Content Options for a Schema Element.
The Annotation Element.
Attributes of an annotation Element.
Content Options for an Annotation Element.
The Appinfo Element.
Attributes of an Appinfo Element.
Content Options for an Appinfo Element.
The documentation Element.
Attributes of a Documentation Element.
Content Options for a Documentation Element.
The Include Element.
Attributes of an Include Element.
Content Options for an Include Element.
The Import Element.
Attributes of an Import Element.
Content Options for an Import Element.
The Notation Element.
Attributes of a Notation Element.
Content Options for a Notation Element.
The Redefine Element.
Attributes of a Redefine Element.
Content Options for a Redefine Element.
8. Element Types.
An Example of a Trivial Element Type.
Concepts and Observations.
Global and Local Element Types.
Substitution Groups.
Blocking Substitution.
Element Type Instantiability.
Nillable Element Types.
Element Types and Namespaces.
The Element Element.
Attributes of an Element Element.
Content Options for an Element Element.
The any Element.
Attributes of an any Element.
Content Options for an AnyAttribute Element.
9. Attribute Types.
An Example of an Attribute Type.
An Example of a Named Attribute-use Group.
An Example of AnyAttribute.
Concepts and Observations Regarding Attribute Types.
When to Use an Attribute Type.
Global and Local Attribute Types.
Namespaces and Attribute Types.
The Attribute Element.
Attributes of an Attribute Element.
Content Options for an Attribute Element.
The AttributeGroup Element.
Attributes of an AttributeGroup Element.
Content Options for an AttributeGroup Element.
The AnyAttribute Element.
Attributes of an AnyAttribute Element.
Content Options for an AnyAttribute Element.
10. Simple Types.
An Example of a Simple Type Derived from the Built-In Token Datatype.
An Example of a Pattern-Constrained Simple Type.
An Example of a Simple Type Derived from a User-derived Simple Type.
Concepts and Observations.
Constraining Facets.
The Value Space.
The Lexical Space.
The Canonical Lexical Representation.
Non-Instantiable Simple Types.
Global, Local, and Anonymous Simple Types.
Blocking.
The SimpleType Element.
Attributes of a SimpleType Element.
Constraining Facets of a SimpleType Element.
The Restriction Element.
Attributes of a Restriction Element.
Content Options for a Restriction Element.
Constraining Facets of a Restriction Element.
The List Element.
Attributes of a List Element.
Content Options for a List Element.
Constraining Facets of a List Element.
The Union Element.
Attributes of a Union Element.
Content Options for a Union Element.
Constraining Facets of a Union Element.
11. Complex Types.
An Example of a Complex Type Specifying Empty Content.
An Example of a Complex Type That Adds Attributes to a Simple Type.
An Example of a Complex Type Specifying Nested Element Types.
An Example of a Complex Type Specifying Mixed Content.
Concepts and Observations.
Explicitly Non-Instantiable Complex Types.
Implicitly Non-Instantiable Complex Types.
Adding Element Types or Attribute Types to a Derived Complex Type.
Removing Element Types or Attribute Types from a Derived Complex Type.
Prohibiting Extension or Restriction of a Complex Type.
Shorthand Notation of a Complex Type.
The ComplexType Element.
Attributes of a ComplexType Element.
Content Options for a ComplexType Element.
The SimpleContent Element.
Attributes of a SimpleContent Element.
Content Options for a SimpleContent Element.
The ComplexContent Element.
Attributes of a ComplexContent Element.
Content Options for a ComplexContent Element.
The Extension Element.
Attributes of an Extension Element.
Content Options for an Extension Element.
The Restriction Element.
Attributes of a Restriction Element.
Content Options for a Restriction Element.
The All Element.
Attributes of an All Element.
Content Options for an All Element.
The Choice Element.
Attributes of a Choice Element.
Content Options for a Choice Element.
The Sequence Element.
Attributes of a Sequence Element.
Content Options for a Sequence Element.
The Group Element.
Attributes of a Group Element.
Content Options for a Group Element.
12. Built-In Datatypes.
Numeric Datatypes.
The Built-In decimal Datatype.
The Built-In Floating-Point Datatypes: Float and Double.
The Built-in Infinite Integer Datatypes: Integer, Positiveintegeer, Negativeinteger, Nonpositiveinteger, Annonnegativeinteger.
The Built-in Finite Integer Datatypes: Long, Int, Short, Byte, Unsignedlonng, Unsignedint, Unsignedshortand Unsignedbyte.
Date, Time, and Duration Datatypes.
The Built-In Time-Line-based Datatypes: Datetime, Date, gYearMontth, and gYear.
The Built-In Duration Datatype.
The Built-In Repeating Dates and Times Datatypes: Time, gMonthDaay, gDay, and gMonth.
String Datatypes.
The Built-In String Datatype.
Ordinary String-Derived Datatypes: Normalizedstring, Token, Languagge, NMTOKEN, NMTOKENS, Name, anNCName.
“Magic” String-Derived Datatypes: IID, IDREF, IDREFS, ENTITY, and ENTITIES.
Oddball Datatypes.
The Built-In QName Datatype.
The Built-In Boolean Datatype.
The Built-In Hexbinary and Base64binary Datatypes.
The Built-in AnyURI Datatype.
The Built-In Notation Datatype.
13. Identity Constraints.
Identity Constraint Example.
Concepts and Observations.
Identity Constraint Terminology.
Selectors and Fields.
Limited XPath Support.
Value Equality.
Enforcing Uniqueness.
Enforcing Referential Integrity.
The Unique Element.
The Attributes of a Unique Element.
Content Options for a Unique Element.
The Key Element.
The Attributes of a Key Element.
Content Options for a Key Element.
The Keyref Element.
The Attributes of a Keyref Element.
Content Options for a Keyref Element.
The Selector Element.
The Attributes of a Selector Element.
Content Options for a Selector Element.
The Field Element.
The Attributes of a Field Element.
Content Options for a Field Element.
14. Regular Expressions.
Concepts and Observations.
Unicode Regular Expression Guidelines.
The Latin Character Set.
Perl Regular Expressions.
XML Schemas.
Regular Expression Syntax.
Metacharacters.
Concatenation.
Alternatives.
Grouping.
Individual Characters.
Cardinality Quantifiers.
Character Classes Expressions.
Precedence.
Constraining Simple Content.
The Pattern Constraining Facet.
Multiple Pattern Constraining Facets (or).
Constraining Derived Types (and).
III. VALIDATION.
15. XML Schema Component Detail.
Schemas: The Basic Idea.
Names.
Annotations.
Schema (Schema Schema Component).
Attribute Types.
Attribute Type (Attribute Declaration Schema Component).
Simple Type (Simple Type Definition Schema Component).
Constraining Facets.
Element Types.
Element Type (Element Declaration Schema Component).
Complex Type (Complex Type Definition Schema Component).
Attribute Set Models.
Content Models.
Simple Type (Simple Type Definition Schema Component) Reprise.
Reusability.
Annotation (Annotation Schema Component).
Notation (Notation Declaration Schema Component).
16. PSVI Detail.
Schema Validation and Schema Processing.
Kinds of Validation.
The Results of Validation.
The PSVI.
The Basic Infoset.
PSVI-Added Properties.
PSVI-Added Information Items.
The New PSVI Information Items.
17. Java and the Apache XML Project.
Apache Background.
Java Xerces on Your Computer.
Downloading Java Xerces 2 Parser.
Exploring the Xerces Package.
Running the Samples.
“Hello Apache”.
Your First Parser.
Parsing “Hello Apache”.
Critical Xerces Packages.
Xerces Java DOM In-Depth.
The Document Interface.
Creating DOM Documents.
The Element Interface.
The Node Interface.
An Advanced DOM Example.
DOM Helpers and DOM Level 3.
Java Xerces SAX In-Depth.
The ContentHandler Interface.
18. MSXML and the Schema Object Model (SOM).
Introducing MSXML.
Concepts and Observations.
…MS Stands for Microsoft.
Proprietary Versus Standard.
XML Schema Examples.
MSXML Fundamentals.
Using MSXML from Visual Basic.
Using the DOM.
Using SAX2.
Schema Object Model (SOM).
SOM Fundamentals.
The ISchemaItem Interface.
The ISchema Interface.
DOM Versus SOM.
Creating XML Schemas.
Validation.
XML Document Samples.
Validation by Using the DOM.
Validation by Using SAX2.
Example: XML Schema Tree.
IV. RESULT-ORIENTED SCHEMAS.
19. Object-Oriented Schemas.
Concepts and Observations.
Fundamentals of Object-Oriented Development.
Use of Languages.
Object-Oriented Concepts.
Encapsulation.
Inheritance.
Polymorphism.
XML Schemas and Objects.
The Good.
The Bad.
The Answer.
Mapping XML Schemas to Object-Oriented Languages.
Complex Types.
Element Types.
Attributes.
Schemas.
Simple Types.
Annotation.
Putting It Together.
Sample Schema: Party.xsd.
Design Patterns.
Builder Pattern and XML Schemas.
Language Examples.
Visual Basic.
C++.
C# and the .NET Framework.
20. Document-Oriented Schemas.
Why Use XML for Documents?
Creating a Schema for a Set of Documents: Document Analysis.
Scenario: A Document Analysis.
Structures to Look For.
More Detail.
Implementing Document Processing.
Help for the Author.
Help for the Editor.
Automating Production.
21. Application-Oriented Schemas.
XML Applications.
Fundamentals of XML Applications.
XML Input and Output.
Transport Protocol.
Business Logic.
Role of XML Schemas.
Validation of Data.
Describing Arguments.
Describing Applications.
Application Structure.
Sovereign.
Request-response.
Routing.
Transporting XML.
Transport Protocols.
HTTP.
XML and HTTP.
Describing Applications.
Using XML Schemas. 0672323745T09112002
About the Author :
Cliff Binstock, the owner of Robust Software, has more than twenty years of development experience, from hands-on architecture and coding to mentoring and project leadership.
Dave Peterson serves on the W3C XML Schema Working Group. Currently principal consultant with his own firm, SGMLWorks!, he has worked with the SGML and XML markup languages for sixteen years, and has been programming and designing software systems for thirty-six years.
Mitchell Smith has seventeen years of experience in software development, including architecture, development, project management, object-oriented analysis and design, and database design and implementation.
Mike Wooding has developed hardware and software products since 1975, and has extensive experience with XML technologies.
Chris Dix is lead developer for Navtrak, where he specializes in .NET development using XML. He is the coauthor of Professional XML Web Services (Wrox Press, 2001).
Chris Galtenberg is a writer, inventor, and methodologist interested in extending human intelligence through philosophy and software.
0672323745AB09232002