Namespaces and XSLT
The example source and stylesheet documents used throughout this chapter have made no use of namespaces other than the required affiliation of XSLT instructions and constructs with the XSLT namespace. This was intentional in order to make the literal result elements and XPath expressions more compact and readable. In general, this is unrealistic, as most interesting XML documents rely on namespaces quite heavily.
Recall that nonprefixed QNames that appear in XPath expression are assumed to be unaffiliated with respect to namespaces. This is true irrespective of any default namespace declaration that may be in effect. Prefixed QNames that appear in XPath expressions are always expanded prior to being used in a NodeTest or ...
Get Essential XML: Beyond Markup now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.