当先锋百科网

首页 1 2 3 4 5 6 7
General Principles
  • Understand when it is appropriate to use schemas
    • List pros and cons of validating documents with schemas (as opposed to not validating documents)
    • Name advantages of schemas over DTDs
  • Describe the limitations of schemas:
    • What types of data schemas are good at validating
    • What types of data are better validated by other means
Vocabulary Define the fundamental schema vocabulary:
  • instance document
  • qualified / unqualified name
  • simple type / content
  • complex type / content
  • mixed content
  • derivation / restriction / extension / union / facet
<schema ...> element attributes Use the schema element attributes to
  • Associate a namespace with a schema
  • Indicate whether elements and attributes must be qualified
Schema-aware instance documents
  • Decide when to use the schema instance namespace (http://www.w3.org/2001/XMLSchema-instance) and when to use the schema namespace (http://www.w3.org/2001/XMLSchema)
  • Identify and locate schemas from an XML document
  • List reasons for and against making documents schema-aware
Data types Differentiate the lexical and value space of data. Special types and values
  • Indicate in a schema that an element can be nil
  • Declare a nil (null) element in an instance document
  • Explain the difference between empty elements and nil elements
  • Describe the available ways of handling whitespace: preserving, replacing, collapsing
Predefined data types

Write schema using the following predefined data types:

  • xs:anySimpleType
  • String data types: xs:string, xs:normalizedString, xs:token, xs:language
  • Numeric data types: xs:float, xs:double, xs:decimal, xs:integer, xs:long, xs:int, xs:short, xs:byte
  • Other: xs:boolean, xs:dateTime, xs:date, xs:time

Note: There are (many) more predefined data types than the ones in this list. The ones which are not in the list are outside the scope of this exam!

Restricting data types Reduce the value space of another type using
  • Intervals (minInclusive, maxExclusive, etc.)
  • Enumerated values
  • Patterns
  • Whitespace restriction
Extending data types
  • Indicate which types can be used as base types
  • Specify how an extended data type relates to it's base type
  • Distinguish the possibilities when extending complex data types with
    • empty content model (containing neither child elements nor text nodes)
    • simple content model (containing only text nodes, no child elements)
    • mixed content model (potentially containing both child elements and text nodes)
Complex data types Construct the four types of complex data types (each with or without attributes):
  • empty: <product id="123" />
  • sub-elements only (no free text): <employee><name>John</name></employee>
  • containing unparsed character data: <food type="dessert">Ice cream</food>
  • mixed: <text>He was <it>really</it> angry.</text>
Schema documentation
  • Motivate embedded documentation in schemas
  • Use the annotation, appinfo and documentation elements to document schemas
  • Explain the advantages of documenting schemas using these elements, as opposed to plain old <!-- ... --> style comments
  • Define the possible documentation formats which can be used in documentation