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

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
13.46Mb size Format: txt, pdf, ePub
ads

The official rule for
schema-element(S)
is that the element must satisfy two conditions: its element name must be present in the substitution group of S, and its type annotation must be either the type of S or one of its subtypes. There is a slight loophole in that this will match an element that was actually validated against a local element declaration that just happened to match the name and type of something in the substitution group. This loophole does little harm and was left in because preventing it would require additional information to be retained in the data model, namely an extra annotation indicating the element declaration that was used to validate an element.

It's much less common to encounter global attribute declarations, but they are also supported in the same way, for symmetry.

The full syntax for this form of
ElementTest
and
AttributeTest
is shown below.

Expression
Syntax
SchemaElementTest
schema-element
(
ElementName
)
SchemaAttributeTest
schema-attribute
(
AttributeName
)
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
13.46Mb size Format: txt, pdf, ePub
ads

Other books

Sweet Danger by Violet Blue
The Chinese Agenda by Joe Poyer
Amazonia by Ariela Vaughn
The House on Seventh Street by Karen Vorbeck Williams
What Happens Abroad by Jen McConnel
Etched by Dean, Eliza
Her Perfect Mate by Paige Tyler