Book contents
- Frontmatter
- Contents
- Introduction
- Part 1 Modeling Web Data
- 1 Data Model
- 2 XPath and XQuery
- 3 Typing
- 4 XML Query Evaluation
- 5 Putting into Practice: Managing an XML Database with eXist
- 6 Putting into Practice: Tree Pattern Evaluation Using SAX
- Part 2 Web Data Semantics and Integration
- Part 3 Building Web Scale Applications
- Bibliography
- Index
3 - Typing
from Part 1 - Modeling Web Data
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Introduction
- Part 1 Modeling Web Data
- 1 Data Model
- 2 XPath and XQuery
- 3 Typing
- 4 XML Query Evaluation
- 5 Putting into Practice: Managing an XML Database with eXist
- 6 Putting into Practice: Tree Pattern Evaluation Using SAX
- Part 2 Web Data Semantics and Integration
- Part 3 Building Web Scale Applications
- Bibliography
- Index
Summary
In this chapter, we discuss the typing of semistructured data. Typing is the process of describing, with a set of declarative rules or constraints called a schema, a class of XML documents, and verifying that a given document is valid for that class (we also say that this document is valid against the type defined by the schema). This is, for instance, used to define a specific XML vocabulary (XHTML, MathML, RDF, etc.), with its specificities in structure and content, that is used for a given application.
We first present motivations and discuss the kind of typing that is needed. XML data typing is typically based on finite-state automata. Therefore, we recall basic notion of automata, first on words, then on ranked trees, finally on unranked trees (i.e., essentially on XML). We also present the main two practical languages for describing XML types, DTDs, and XML Schema, both of which endorsed by the W3C.We then briefly describe alternative schema languages with their key features. In a last section, we discuss the typing of graph data.
One can also consider the issue of “type checking a program,” that is, verifying that if the input is of a proper input type, the program produces an output that is of a proper output type. In Section 3.5, we provide references to works on program type checking in the context of XML.
MOTIVATING TYPING
Perhaps the main difference with typing in relational systems is that typing is not compulsory for XML.
- Type
- Chapter
- Information
- Web Data Management , pp. 72 - 94Publisher: Cambridge University PressPrint publication year: 2011