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

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

refer to the same namespace. If the name has no prefix, it has a null namespace URI—it does not use the default namespace.

It is an error for two sibling

elements to have the same name, after namespace prefixes are replaced with namespace URIs. In other words, you can't supply two values for the same parameter. This applies even if one is a tunnel parameter and the other is not.

The

element does not actually declare a variable, so there is no problem if the name is the same as that of a variable that is currently in scope. In fact, it is quite normal to pass a parameter in the form:


This is used to ensure that the variable
$current-user
in the called template has the same value as the variable
$current-user
in the calling template.

If the
as
attribute is present, then the supplied value of the parameter is converted to the specified type using the same rules as for

. There is no requirement that this type must be identical to the declared type of the corresponding

: For example the

might specify
as=“xs:byte”
when the

specifies
as=“xs:integer”
. This means that potentially two conversions may take place, from the type of the supplied value as calculated by the select expression, to the type declared in the
as
attribute of

, to the type declared in the
as
attribute of the corresponding

. In each case the standard conversion rules are used, as described in the entry for

on page 505.

Other books

The Green Gyre by Tanpepper, Saul
Dangerous Deception by Peg Kehret
Woods Runner by Gary Paulsen
Second to No One by Palmer, Natalie
So Shall I Reap by Kathy-Lynn Cross
The Ramblers by Aidan Donnelley Rowley
Refuge by Andrew Brown