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
8.41Mb size Format: txt, pdf, ePub
ads

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.

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

Other books

the First Rule (2010) by Crais, Robert - Joe Pike 02
Case Closed by Jan Burke
The Dream Bearer by Walter Dean Myers
We Are Here by Cat Thao Nguyen
Poison Kissed by Erica Hayes
The Malcontenta by Barry Maitland