| |
| |
Introduction | |
| |
| |
| |
Introducing Xml | |
| |
| |
| |
What Is Xml? | |
| |
| |
Steps Leading up to XML: Data Representation and Markups | |
| |
| |
Binary Files | |
| |
| |
Text Files | |
| |
| |
A Brief History of Markup | |
| |
| |
The Birth of XML | |
| |
| |
More Advantages of XML | |
| |
| |
XML Rules | |
| |
| |
Hierarchical Data Representation | |
| |
| |
Interoperability | |
| |
| |
XML in Practice | |
| |
| |
Data Versus Document | |
| |
| |
XML Scenarios | |
| |
| |
XML Technologies | |
| |
| |
Summary | |
| |
| |
| |
WELL-FORMED XML | |
| |
| |
What Does Well-Formed Mean? | |
| |
| |
Creating XML in a Text Editor | |
| |
| |
Forbidden Characters | |
| |
| |
XML Prolog | |
| |
| |
Creating Elements | |
| |
| |
Attributes | |
| |
| |
Element and Attribute Content | |
| |
| |
Processing Instructions | |
| |
| |
CDATA Sections | |
| |
| |
Advanced XML Parsing | |
| |
| |
XML Equivalence | |
| |
| |
Whitespace Handling | |
| |
| |
Error Handling | |
| |
| |
The XML Infoset | |
| |
| |
The Document Information Item | |
| |
| |
Element Information Items | |
| |
| |
Attribute Information Items | |
| |
| |
Processing Instruction Information Items | |
| |
| |
Character Information Item | |
| |
| |
Comment Information Item | |
| |
| |
Namespace Information Item | |
| |
| |
The Document Type Declaration Information Item | |
| |
| |
Unexpanded Entity Reference Information Item | |
| |
| |
Unparsed Entity Information Item | |
| |
| |
Notation Information Item | |
| |
| |
Summary | |
| |
| |
| |
Xml Namespaces | |
| |
| |
Defi ning Namespaces | |
| |
| |
Why Do You Need Namespaces? | |
| |
| |
How Do You Choose a Namespace? | |
| |
| |
URLs, URIs, and URNs | |
| |
| |
Creating Your First Namespace | |
| |
| |
How to Declare a Namespace | |
| |
| |
How Exactly Does Scope Work? | |
| |
| |
Declaring More Than One Namespace | |
| |
| |
Changing a Namespace Declaration | |
| |
| |
Namespace Usage in the Real World | |
| |
| |
XML Schema | |
| |
| |
Documents with Multiple Namespaces | |
| |
| |
When to Use and Not Use Namespaces | |
| |
| |
When Namespaces are Needed | |
| |
| |
When Namespaces Are Not Needed | |
| |
| |
Versioning and Namespaces | |
| |
| |
Common Namespaces | |
| |
| |
The XML Namespace | |
| |
| |
The XMLNS Namespace | |
| |
| |
The XML Schema Namespace | |
| |
| |
The XSLT Namespace | |
| |
| |
The SOAP Namespaces | |
| |
| |
The WSDL Namespace | |
| |
| |
The Atom Namespace | |
| |
| |
The MathML Namespace | |
| |
| |
The Docbook Namespace | |
| |
| |
Summary | |
| |
| |
| |
Validation | |
| |
| |
| |
Document Type Definitions | |
| |
| |
What Are Document Type Defi nitions? | |
| |
| |
Working with DTDs | |
| |
| |
Using jEdit | |
| |
| |
The Document Type Declaration in Detail | |
| |
| |
Sharing DTDs | |
| |
| |
Anatomy of a DTD | |
| |
| |
Element Declarations | |
| |
| |
Attribute Declarations | |
| |
| |
Entity Declarations | |
| |
| |
DTD Limitations | |
| |
| |
Summary | |
| |
| |
| |
Xml Schemas | |
| |
| |
Benefi ts of XML Schemas | |
| |
| |
XML Schemas Use XML Syntax | |
| |
| |
XML Schema Namespace Support | |
| |
| |
XML Schema Data Types | |
| |
| |
XML Schema Content Models | |
| |
| |
XML Schema Specifi cations | |
| |
| |
XML Schemas in Practice | |
| |
| |
Defi ning XML Schemas | |
| |
| |
Declarations | |
| |
| |
Declarations | |
| |
| |
Mixed Content | |
| |
| |
Declarations | |
| |
| |
Declarations | |
| |
| |
An XML Schema for Contacts | |
| |
| |
Data Types | |
| |
| |
Declarations | |
| |
| |
Creating a Schema from Multiple Documents | |
| |
| |
Declarations | |
| |
| |
Declarations | |
| |
| |
Documenting XML Schemas | |
| |
| |
XML Schema 1.1 | |
| |
| |
Relaxed Rules | |
| |
| |
Summary | |
| |
| |
| |
Relax Ng And Schematron | |
| |
| |
Why Do You Need More Ways of Validating XML? | |
| |
| |
Setting Up Your Environment | |
| |
| |
Using RELAX NG | |
| |
| |
Understanding the Basics of RELAX NG | |
| |
| |
Understanding RELAX NG’s Compact Syntax | |
| |
| |
Converting Between the Two RELAX NG Formats | |
| |
| |
Constraining Content | |
| |
| |
Reusing Code in RELAX NG Schema | |
| |
| |
Using Schematron | |
| |
| |
Understanding the Basics of Schematron | |
| |
| |
Choosing a Version of Schematron | |
| |
| |
Understanding the Basic Process | |
| |
| |
Writing Basic Rules in Schematron | |
| |
| |
Creating a Schematron Document | |
| |
| |
Adding More Information to Messages | |
| |
| |
Constraining Values in Schematron | |
| |
| |
Handling Co-Constraints in Schematron | |
| |
| |
Using Schematron from Within XML Schema | |
| |
| |
Summary | |
| |
| |
| |
Processing | |
| |
| |
| |
Extracting Data From Xml | |
| |
| |
Document Models: Representing XML in Memory | |
| |
| |
Meet the Models: DOM, XDM, and PSVI | |
| |
| |
A Sample DOM Tree | |
| |
| |
DOM Node Types | |
| |
| |
DOM Node Lists | |
| |
| |
The Limitations of DOM | |
| |
| |
The XPath Language | |
| |
| |
XPath Basics | |
| |
| |
XPath Predicates: The Full Story | |
| |
| |
XPath Steps and Axes | |
| |
| |
XPath Expressions | |
| |
| |
Variables in XPath Expressions | |
| |
| |
New Expressions in XPath 2 | |
| |
| |
XPath Functions | |
| |
| |
XPath Set Operations | |
| |
| |
XPath and Namespaces | |
| |
| |
Summary | |
| |
| |
| |
XSLT | |
| |
| |
What XSLT Is Used For | |
| |
| |
XSLT as a Declarative Language | |
| |
| |
How Is XSLT a Functional Language? | |
| |
| |
Setting Up Your XSLT Development Environment | |
| |
| |
Setting Up Saxon for .NET | |
| |
| |
Setting Up Saxon for Java | |
| |
| |
Foundational XSLT Elements | |
| |
| |
The Element | |
| |
| |
The Element | |
| |
| |
The Element | |
| |
| |
The Element | |
| |
| |
The Element | |
| |
| |
Push-Processing versus Pull-Processing | |
| |
| |
The Role of XPath in XSLT | |
| |
| |
Using Named Templates | |
| |
| |
The Element | |
| |
| |
The document() Function in XSLT | |
| |
| |
Conditional Logic | |
| |
| |
The element | |
| |
| |
The Element | |
| |
| |
and Elements | |
| |
| |
Reusing Code in XSLT | |
| |
| |
The Element | |
| |
| |
The Element | |
| |
| |
The Mode Attribute | |
| |
| |
Understanding Built-In Templates and Built-In Rules | |
| |
| |
Using XSLT 2.0 | |
| |
| |
Understanding Data Types in XSLT 2.0 | |
| |
| |
Creating User-Defi ned Functions | |
| |
| |
Creating Multiple Output Documents | |
| |
| |
Using the collection() Function | |
| |
| |
Grouping in XSLT 2.0 | |
| |
| |
Handling Non-XML Input with XSLT 2.0 | |
| |
| |
XSLT and XPath 3.0: What’s Coming Next? | |
| |
| |
Summary | |
| |
| |
| |
Databases | |
| |
| |
| |
Xquery | |
| |
| |
XQuery, XPath, and XSLT | |
| |
| |
XQuery and XSLT | |
| |
| |
XQuery and XPath | |
| |
| |
XQuery in Practice | |
| |
| |
Standalone XQuery Applications | |
| |
| |
Part of SQL | |
| |
| |
Callable from Java or Other Languages | |
| |
| |
A Native-XML Server | |
| |
| |
XQuery Anywhere | |
| |
| |
Building Blocks of XQuery | |
| |
| |
FLWOR Expressions, Modules, and Functions | |
| |
| |
XQuery Expressions Do Not Have a Default Context | |
| |
| |
The Anatomy of a Query Expression | |
| |
| |
The Version Declaration | |
| |
| |
The Query Prolog | |
| |
| |
The Query Body | |
| |
| |
Some Optional XQuery Features | |
| |
| |
XQuery and XPath Full Text | |
| |
| |
The XQuery Update Facility | |
| |
| |
XQuery Scripting Extension | |
| |
| |
Coming in XQuery 3.0 | |
| |
| |
Grouping and Windowing | |
| |
| |
The count Clause | |
| |
| |
Try and Catch | |
| |
| |
switch Expressions | |
| |
| |
Function Items and Higher Order Functions | |
| |
| |
JSON Features | |
| |
| |
XQuery, Linked Data, and the Semantic Web | |
| |
| |
Summary | |
| |
| |
| |
Xml And Databases | |
| |
| |
Understanding Why Databases Need to Handle XML | |
| |
| |
Analyzing which XML Features are Needed in a Database | |
| |
| |
Retrieving Documents | |
| |
| |
Retrieving Data from Documents | |
| |
| |
Updating XML Documents | |
| |
| |
Displaying Relational Data as XML | |
| |
| |
Presenting XML as Relational Data | |
| |
| |
Using MySQL with XML | |
| |
| |
Installing MySQL | |
| |
| |
Adding Information in MySQL | |
| |
| |
Querying MySQL | |
| |
| |
Updating XML in MySQL | |
| |
| |
Usability of XML in MySQL | |
| |
| |
Client-Side XML Support | |
| |
| |
Using SQL Server with XML | |
| |
| |
Installing SQL Server | |
| |
| |
Presenting Relational Data as XML | |
| |
| |
Understanding the xml Data Type | |
| |
| |
Creating Indexes with the xml Data Type | |
| |
| |
W3C XML Schema in SQL Server | |
| |
| |
Dealing with Namespaced Documents | |
| |
| |
Using eXist with XML | |
| |
| |
Downloading and Installing eXist | |
| |
| |
Interacting with eXist | |
| |
| |
Summary | |
| |
| |
| |
Programming | |
| |
| |
| |
Event-Driven Programming | |
| |
| |
Understanding Sequential Processing | |
| |
| |
Using SAX in Sequential Processing | |
| |
| |
Preparing to Run the Examples | |
| |
| |
Receiving SAX Events | |
| |
| |
Handling Invalid Content | |
| |
| |
Using the DTDHandler Interface | |
| |
| |
EntityResolver Interface | |
| |
| |
Understanding Features and Properties | |