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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access