XPath/XQuery QName-equal function

Summary

Returns true if two supplied QNames have the same namespace URI and the same local part.

Operator Mapping

Defines the semantics of the "eq" and "ne" operators when applied to two values of type xs:QName.

Signature

op:QName-equal(
$arg1 as xs:QName,
$arg2 as xs:QName
) as xs:boolean

Properties

This function is deterministic, context-independent, and focus-independent.

Rules

The function returns true if the namespace URIs of $arg1 and $arg2 are equal and the local names of $arg1 and $arg2 are equal.

Otherwise, the function returns false.

The namespace URI parts are considered equal if they are both absent, or if they are both present and equal under the rules of the fn:codepoint-equal function.

The local parts are also compared under the rules of the fn:codepoint-equal function.

Notes

The prefix parts of $arg1 and $arg2, if any, are ignored.