Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
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
.