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
9.9Mb 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

Blacklight Blue by Peter May
Some Great Thing by Lawrence Hill
Time to Run by John Gilstrap
Candy by Terry Southern
The Shakespeare Thefts by Eric Rasmussen
You Live Once by John D. MacDonald
54 - Don't Go To Sleep by R.L. Stine - (ebook by Undead)
The House of Dies Drear by Virginia Hamilton