Name

namespace-uri( ) — returns the namespace URI of a the name of a node, without regard to the local name

Synopsis

Defined in: XPath 1.0
Parameters: node-set ns (optional)
Return type: string

Only the first node (in document order) of the node-set is considered. For anything other than attribute and element nodes, the return value will always be the empty string. When called with no parameters, the namespace URI of the context node is returned.

This example returns the namespace URI of the element xforms:model, which is http://www.w3.org/2002/xforms:

namespace-uri(xforms:model)

Get XForms Essentials 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.