Training/XMLandW3CXMLSchema

Sample Course Outline: XML and W3C XML Schema

Provides an introduction to XML markup, W3C XML Schema. The course uses is customised to use your documents and schema modules in its exercises.

This course suits someone who knows what XML is but has yet to look at the details of XML documents and W3C XML Schema.

By the end of the course, the participants will:

  • Understand XML markup and fix non-wellformed XML
  • Read W3C XML Schema documents
  • Understand the W3C XML Schema type system
  • Understand the structure and conventions of your schema
  • Be familiar with XML and W3C XML Schema editing

Duration: 1 day or 2 days

Introduction

  • History
    • SGML
    • XML
      • XML 1.0 editions
      • XML 1.1
    • Where XML is used
    • APIs for XML

XML Documents

  • What is an XML document?
  • Elements
  • Attributes
    • Parsing attributes
    • xml:lang, xml:space, xml:base, xml:id
  • Wellformedness
  • Text
    • Reserved characters
    • Predefined entities
    • Numeric character references
  • Processing instructions
  • XML Declaration
    • XML Declaration is not a processing instruction
  • Comments
  • DOCTYPE (brief)
    • External subset
    • Internas subset
    • Element declarations
    • Attribute declarations
    • Entities
      • General entities
      • External parsed entities
      • External unparsed entities
    • Notation declarations

Namespaces

  • Namespaces in XML
  • Namespaces 1.0, Namespaces 1.1
  • Default namespace
  • Scope

XML Schemas

  • Why?
  • Schema technologies
    • DTD
    • W3C XML Schema
      • 1.0
      • Forthcoming 1.1
    • Relax NG
    • Related technologies
      • NVDL
      • GRDDL

W3C XML Schema

  • Simple schema
    • Start with a simple document
    • Develop simple schema for document
    • Use only global elements and attributes
  • Add datatypes
    • Review predefined datatypes
    • Add datatypes to simple schema
  • Define new datatypes
    • Derivation by restriction, list, union
    • Add new datatypes to the schema
  • Patterns
    • Add patterns to the schema
  • Complex datatypes
    • Alternative ways to write the example schema
  • Modular schemas
    • Introduce a second, simple document
    • Modularise the schema to put common elements in a separate module
  • Compare to standard schema
    • Introduce your schema for documents
    • Discuss annotations, etc., that aren't obvious from looking at instance documents
    • Discuss best practices from your schema design
  • Extending the schema
    • xs:anyType

More Information

  • Where to go for more information