home contribute faq download

FunctX XQuery Functions

fn:namespace-uri-from-QName

The namespace part of a QName

Google
Webdatypic.com

Description

The fn:namespace-uri-from-QName function returns the namespace part of an xs:QName. If you want to retrieve the namespace of an element or attribute name, you should consider using the fn:namespace-uri function instead; you cannot pass element or attribute nodes directly to this function.

This description is © Copyright 2007, Priscilla Walmsley. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book.

Arguments and Return Type

NameType
$arg xs:QName?
return value xs:anyURI?

Examples

XQuery ExampleResults
namespace-uri-from-QName(
  QName ('http://datypic.com/pre', 'prefixed'))
http://datypic.com/pre
namespace-uri-from-QName(
  QName ('', 'unprefixed'))
zero-length xs:anyURI value
namespace-uri-from-QName( () )
()

See Also

fn:local-name-from-QNameThe local part of a QName
fn:resolve-QNameResolves a QName based on the in-scope namespaces of an element
fn:namespace-uriThe namespace URI of a node
fn:namespace-uri-for-prefixThe namespace associated with a prefix, in the scope of an element

History

Published OnLast UpdatedContributor(s)
2006-06-272007-02-26W3C, XQuery 1.0 and XPath 2.0 Functions and Operators, http://www.w3.org/TR/xpath-functions/
Datypic XQuery Services

Recommended Reading:

XQuery