Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

DefaultNamespaceDecl

Declare a default namespace.


Syntax

DefaultNamespaceDecl

graphics/DefaultNamespaceDecl.png

StringLiteral

Top of page

Description

A DefaultNamespaceDecl is part of a prolog and declares a default namespace in order to use unprefixed QNames. It consists of the keyword sequence declare default, followed by either of the keywords element or function, the keyword namespace, and a string literal representing the namespace URI.

As the syntax suggests, you can declare a default namespace for elements as well as functions. However, a prolog must not contain more than one of each kind of declaration. If no default function namespace is declared, it is the namespace of the XQuery/XPath functions, http://www.w3.org/2002/08/xquery-functions, which is prefixed by "fn" and "xf".

Note:
The syntax variant without the keyword declare, but with the equals sign, was used in previous versions of the W3C XQuery specification as well as in Tamino. It has been retained for compatibility reasons.

Top of page

Examples

Top of page

Related Syntax Construct

The following construct(s) refer to this construct:

This construct is also related to the following construct(s):

NamespaceDecl

Top of page