WSDXML_NAMESPACE structure (wsdxmldom.h)

Specifies an XML namespace.

Syntax

typedef struct _WSDXML_NAMESPACE {
  const WCHAR *Uri;
  const WCHAR *PreferredPrefix;
  WSDXML_NAME *Names;
  WORD        NamesCount;
  WORD        Encoding;
} WSDXML_NAMESPACE;

Members

Uri

The URI that identifies the namespace.

PreferredPrefix

The preferred prefix to be used in XML prefix mappings.

Names

Reference to an array of WSDXML_NAME structures that specify the names in the namespace.

NamesCount

The number of names in the Names array.

Encoding

The encoded reference for the namespace.

Remarks

WSDXML_NAMESPACE represents the association between a namespace URI and a list of names belonging to that namespace. Additionally, it provides a PreferredPrefix for the namespace, which gives guidance on the default prefix to use for a specified namespace. In the context of WSDAPI, there are two types of namespaces: static namespaces and dynamic namespaces.

Static namespaces are user provided, well known, and assumed to be complete namespaces, in that all names belonging to the namespace should be in names array. When processing a received XML document, any element or attribute in the document that claims to be in a static namespace but has a name not listed in that namespace is treated as an error. Static namespaces are typically generated pre-compile time, by a tool like WSDCodeGen.

Dynamic namespaces are generated by WSDAPI. These are built when new namespaces are seen in XML documents. With dynamic namespaces, no assumptions can be made about whether a specified name actually belongs to the formal namespace or not, so all names are accepted as being part of the namespace. As such, dynamic namespaces expand the Names array as they process new names in a specified document.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header wsdxmldom.h