Advanced XML Programming
Outline
Please turn off all
Part I: Semantics and Syntax
A normal XML document
A canonical XML document
An org.w3c.dom.Document object formed by reading hotcop.xml
An encrypted hotcop.xml
Are these four the same thing or not?
What is the XML Infoset?
The Infoset defines 11 kinds of Information Items
The Document Information Item
Elements
Element Information Items
Attributes
Comments
A Processing Instruction Information Item Includes:
Characters
Namespaces
Document Type Declaration
Document Type Definition
Entities
Entity Information Items
Unparsed Entity Information Items
Unexpanded Entity Information Items
The Infoset Omits:
The PSVI
Questions?
Canonical XML
How are documents canonicalized?
Canonicalization software
Questions?
Digital Signatures
Not Just for Signing XML
Generic Digital Signature Process
XML Signature Process
XML Digital Signature software
A Detached Signature for hotcop.xml
Questions?
XML Encryption
XML Encryption Algorithms
Complete standard algorithm list
XML Encryption Syntax
An XML Document containing sensitive information
An XML Document containing an encrypted element
An XML Document containing encrypted element data
An XML Document containing encrypted text
A completely encrypted XML Document
XML Encryption Software
Issues XML Encryption doesn't address
To Learn More
Questions?
Part II: XML 1.1
What you need to know about XML 1.1
New features
Changes in XML 1.1
White Space
Native language markup
Name characters
An XML 1.1 document
Harm Reduction proposals
Questions?
Part III: XPath 2.0 and Beyond
XPath 2.0
XPath 2.0 Goals
XPath 2.0 Requirements
XPath 1.0 Data Model
XPath 2.0 Data Model
XPath Comments
Namespace wildcards
Can use functions as location steps
Can use parenthesized expressions as location steps
Dereference steps
Constructing sequences
Sequence example
Unions of sequences
Intersections of sequences
Except sequences
Value comparison operators
General comparisons
Node comparisons
For Expressions
for Example
for Example
Conditional Expressions
Quantified Expressions
Functions and operators
Accessor Functions
Constructor Functions
Arithmetic operators
Numeric comparison operators
Numeric Functions
String functions
Regular expressions
Boolean Functions
Date and time functions
Qualified Name Functions
Binary operators
Node Functions and Operators
Sequence Functions
Context Functions
Casting Functions
Questions?
XSLT 2.0
XSLT 2.0 Goals
XSLT 2.0 Non-goals
XSLT 2.0 Requirements
Some specific improvements that are likely
Identifying 2.0 stylesheets
No result tree fragments
xsl:for-each-group
Grouping example: input
Grouping example: desired output
Grouping example: stylesheet
xsl:destination
xsl:result-document
xsl:result-document Example
Sorting
xsl:namespace
Value of a sequence
default-xpath-namespace
An XSLT 1.0 stylesheet for working with XHTML
An XSLT 2.0 stylesheet for working with XHTML
User defined data elements
Typed variables and parameters
Functions defined in XSLT
Including text files
Questions?
XQuery
XQuery Language
Documents to Query
Physical Representations to Query
Where is XQuery used?
The XML Model vs. the Relational Model
Query Data Types
An example document to query
The XQuery FLWR
Query: List titles of all books
Query Result: Book Titles
XQueryX
Element Constructors
Query Result: Book Titles
Query with WHERE
Query Result: Titles of books published by Addison-Wesley
Query with Booleans
Query Result: books published by Addison-Wesley after 1993
Attribute Constructors
Query Result: books published by Addison-Wesley after 1993, including their year and title.
Query with multiple variables
Query Result: A list of all the title-author pairs
Nested Queries
Query Result: A list of the title and authors of each book in the bibliography
Query with distinct
Query Result
Query with sorting
Query Result
Queries with functions
Query Result
A different document about books
This document uses a different DTD
Query that joins two documents
Result
prices.xml Query Sample Data
Query with reused variables
Query Result
Multiple FLWR Queries
Query Result
Query Software
What's the difference between XQuery and XSLT?
To Learn More
Questions?
Part IV: SAX 2.1
Goals
Specified vs. Defaulted Attributes
standalone declaration
The version and encoding properties
Feature/Property discovery
DefaultHandler infoset extensions
Parser identification
A Verifier Class as in JDOM
To Learn More
Questions?
Part V: DOM Level 3
DOM Evolution
New Features in DOM Level 3
DOM Level 3 Core Changes
DOMKey
New methods in Node interface
User Data
New methods in Entity
New methods in Document
New methods in Text
Questions?
Bootstrapping
DOM3 Bootstrapping
DOM Error Handler Interfaces
The DOMErrorHandler Interface
The DOMLocator Interface
Questions?
Load and Save
The DOM Process
Parsing documents with DOM2
Parsing documents with JAXP
Parsing documents with DOM3
Load and Save
DOMImplementationLS
Creating DOMImplementationLS Objects
DOMBuilder
DOMInputSource
DOMEntityResolver
DOMWriter
DOMBuilderFilter
DOMWriterFilter
DocumentLS
ParserErrorEvent
Questions?
Grammar Access/Abstract Schemas
What are Abstract Schemas for?
Abstract Schema Interfaces
Loading an Abstract Schema from a URI into an ASModel
Validating a DOM Document against an ASModel
Abstract Schema and AS-Editing Interfaces
The ASObject Interface
The ASModel Interface
The ASContentModel Interface
The ASObjectList Interface
The ASNamedObjectMap Interface
The ASDataType Interface
The ASElementDecl Interface
The ASAttributeDecl Interface
The ASEntityDecl Interface
The ASNotationDecl Interface
Validation Interfaces:
The DocumentAS Interface
Validating a document in-memory
The DOMImplementationAS Interface
Creating a schema in-memory
A DTD for XML-RPC
DOM code to create a DTD schema for XML-RPC
A W3C XML Schema Language schema for XML-RPC
DOM code to create an abstract schema for XML-RPC
Serializing an abstract schema to a file
Schema-guided Document-Editing Interfaces:
The NodeEditAS Interface
The ElementEditAS Interface
The CharacterDataEditAS Interface
The DocumentEditAS Interface
Questions?
To Learn More
Questions?
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2000-2002 Elliotte Rusty Harold
Last Modified March 17, 2002