saxon:EQName

Converts a string in the form of an EQName into an xs:QName value.

EQName($input as xs:string?) ➔ xs:QName()?

Arguments

 

$input

xs:string?

The string to be converted

Result

xs:QName()?

Namespace

http://saxon.sf.net/

Notes on the Saxon implementation

Available since Saxon 10.

Details

If the argument value is an empty sequence then the function returns an empty sequence.

If the input is in the form of an NCName, the result is an xs:QName value in which the prefix and URI are absent, and the local name is the supplied NCName.

If the input is in the form of a lexical QName (that is, prefix:localName), then the prefix is translated to a URI using the in-scope namespace bindings from the static context, and the result is an xs:QName value having this prefix, URI, and localName. If there is no binding for the prefix in the static context, error code FONS0004 is reported.

If the input is in the form of a URIQualifiedName (that is, Q{uri}localName), then the result is an xs:QName value with the specified URI and localName, and with an absent prefix.

All parts of the supplied name are validated, and error code FOCA0002 is thrown if invalid. The only constraints on the URI are that it must not contain curly braces ("{" or "}").