Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

NamespaceDecl

Declare a namespace.


Syntax

NamespaceDecl

graphics/NamespaceDecl.png

NCName StringLiteral

Top of page

Description

A NamespaceDecl is part of a prolog and declares a namespace for later use in the query body or module. It consists of the keywords declare namespace, an NCName that represents the namespace prefix, and a string literal, which is the namespace URI.

There is a number of namespace URIs predeclared that you can use without a namespace declaration of your own. These are:

Prefix Namespace URI
fn http://www.w3.org/2002/08/xquery-functions
local http://www.w3.org/2004/07/xquery-local-functions
tdf http://namespaces.softwareag.com/tamino/TaminoDavFunction
tf http://namespaces.softwareag.com/tamino/TaminoFunction
xdt http://www.w3.org/2004/07/xpath-datatypes
xf http://www.w3.org/2002/08/xquery-functions
xml http://www.w3.org/XML/1998/namespace
xs http://www.w3.org/2001/XMLSchema

Note:
You can also declare a namespace directly in an element constructor, e.g.: <library xmlns:dotcom="http://company.dot.com/namespaces/corporate"/>

Top of page

Examples

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page