XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (185 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
8.51Mb size Format: txt, pdf, ePub
  • If you use the option
    validation=“strict”
    or
    validation=“lax”
    , then you may be required to import the schema used to perform this validation, even if there are no explicit references in the stylesheet to the names defined in this schema. The XSLT specification leaves it open to the implementation to use other mechanisms to locate a schema at runtime to perform this validation, but if you import the schema explicitly, then you avoid any dependence on such mechanisms.

When the construct
schema-element(N)
or
schema-attribute(N)
is used in a
SequenceType
, then N must be the name of a global element or attribute declaration defined in an imported schema. Similarly, when the constructs
element(N, T)
or
attribute(N, T)
are used, then T must be the name of a simple or complex type defined in an imported schema, unless it is the name of a built-in type. But in these constructs the name N does not need to be present in the schema; this allows reference to local elements and attributes provided that they have a global type definition.

For example, if you create an element like this:


  


you will later be able to match this using:


even though there is no imported schema defining the element name
temp
.

Other books

PearlHanger 09 by Jonathan Gash
Scavengers by Christopher Fulbright, Angeline Hawkes
Let the Great World Spin by Colum McCann
The Rosary Girls by Richard Montanari
Black Glass by John Shirley
The Bone People by Keri Hulme
Blue Boy 1: Bullet by Garrett Leigh
The Approach by Chris Holm