The Bleeding Edge of XML
Outline
Please turn off all
Part I: XML Infoset
A normal XML document
A canonical XML document
An org.w3c.dom.Document object formed by reading hotcop.xml
Are these three 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:
Questions?
Canonical XML
How are documents canonicalized?
Canonicalization software
Questions?
Digital Signatures
Not Just for Signing XML
Signature Process
XML Digital Signature software
A Detached Signature for hotcop.xml
To Learn More
Questions?
Part II: XSLT 2.0 and Beyond
XPath 2.0
XPath 2.0 Goals
XPath 2.0 Requirements
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 compliant stylesheets
No result tree fragments
Multiple Output Documents
xsl:document Example
xsl:script Top-level Element
xsl:script with Java
xsl:script with JavaScript
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
Tentative Function List
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
To Learn More
Questions?
Part III: 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 III.V: XML Blueberry
XML Blueberry
White Space
Native language markup
Unicode still isn't finished
How to identify Blueberry
Harm Reduction proposals
Part IV: DOM Level 3
DOM Evolution
New Features in DOM Level 3
DOM Level 3 Core Changes
DOMKey
New methods in Node interface
New methods in Entity
New methods in Document
New methods in Text
Questions?
Bootstrapping
DOM3 Bootstrapping
Questions?
Load and Save
The DOM Process
Parsing documents with DOM2
Parsing documents with DOM3
Load and Save
DOMImplementationLS
DOMBuilder
DOMInputSource
DOMEntityResolver
DOMWriter
DOMBuilderFilter
DOMCMBuilder
DOMCMWriter
DocumentLS
ParserErrorEvent
Questions?
Grammar Access/Abstract Schemas
Abstract Schema Interfaces
Abstract Schema and AS-Editing Interfaces
The ASModel Interface
The ASExternalModel Interface
The ASNode Interface
The ASNodeList Interface
The ASNamedNodeMap Interface
The ASDataType Interface
The ASPrimitiveDataType Interface
The ASElementDeclaration Interface
The ASChildren Interface
The ASAttributeDeclaration Interface
The EntityDeclaration Interface
The ASNotationDeclaration Interface
Validation and Other Interfaces:
The Document Interface
The DocumentAS Interface
The DOMImplementationAS Interface
Schema-guided Document-Editing Interfaces:
The NodeAS Interface
The ElementAS Interface
The CharacterDataAS Interface
The DocumentTypeAS Interface
The AttributeAS Interface
Questions?
DOM Error Handler Interfaces
The DOMErrorHandler Interface
The DOMLocator Interface
To Learn More
Questions?
Part V: JDOM
Where we're going
What is JDOM?
About JDOM
JDOM versions
Five packages:
The org.jdom package
The org.jdom.input package
The org.jdom.output package
The org.jdom.adapters package
The org.jdom.transform package
Writing XML Documents with JDOM
A JDOM program that writes this XML document
Hello JDOM
Actual Output
Hello JDOM 2
Hello DOM
fibonacci.xml
A JDOM program that writes Fibonacci numbers into an XML file
Output
Suppose you want to include a DTD
ValidFibonacci
validfibonacci.xml
Using Namespaces
Rules for Using Namespaces
With Namespace Prefixes
The Default, Unprefixed Namespace
Rules for Using Default Namespace
With Default Namespace
Converting data to XML
Sample Tab Delimited Data: Baseball Statistics
A Program to convert tab delimited data to XML
Baseball Stats in XML
A Shortcut
Questions?
Converting data to XML while Processing it
Batting Averages in XML
Advantages of JDOM for Writing Documents
Questions?
Reading XML with JDOM
JDOM Compatible Parsers for Java
The Design of the DOM API
The JDOM Process
Parsing a Document with JDOM
Parser Results
Turning on Validation in JDOM
JDOM Validator
Validation Output
Building with DOM instead of SAX
DOMBuilder Example
Weblogs: One Task, Three Implementations
Goal: Return a list of all the URLs in this list as java.net.URL objects
SAX Design
User Interface Class
ContentHandler Class
Weblogs Output
DOM Design
Weblogs with DOM
Weblogs Output
JDOM Design
Weblogs with JDOM
Weblogs Output
The org.jdom Package
The Document Node
The Document Class
Document Example
Output from XMLPrinter
Element Nodes
Element Class Implementation
The Element Class
Element Example: XCount
XCount Output
Handling Attributes in JDOM
The Attribute Class
IDTagger
Before IDTagger
After IDTagger
Handling Entities in JDOM
The EntityRef Class
Handling Comments in JDOM
The Comment Class
Comment Example
CommentReader Output
ProcessingInstruction Nodes
The ProcessingInstruction Class
XLinkSpider that Respects the robots Processing Instruction
Handling Namespaces
The Namespace Class
The Namespace Class
DocType Nodes
The DocType class
Example of the DocType Class
XHTMLValidator
Using the XHTMLValidator
The Verifier Class
The Verifier Class
JDOMException
JDOMException Class
The org.jdom.output Package
Serialization
XMLOutputter
Using the XMLOutputter Class Directly
Using the XMLOutputter Class Indirectly
JDOM based TagStripper
Output from a JDOM based TagStripper
Talking to DOM Programs
Talking to SAX Programs
What JDOM doesn't do
To Learn More
Questions?
Part VI: The Oracle Speaks, Predictions for the Future
XSLT 2.0
XQuery
DOM Level 3 succeeds
JDOM succeeds, much to the consternation of the W3C
Stuff we didn't talk about
XInclude succeeds once parsers support it
Schemas, a partial success
XLinks
XPointers; the same story
XSL-FO
XHTML Fails
Schema Repositories all fail
MathML succeeds
SVG Takes Off in 2002
Browser Support
Invent the Future!
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2000, 2001 Elliotte Rusty Harold
Last Modified October 1, 2001