The NamespaceDecorator object is used to decorate
any output node with namespaces. All namespaces added to this are
applied to nodes that require decoration. This can add namespaces
to the node as well as setting the primary namespace reference
for the node. This results in qualification for the node.
This is used to set the primary namespace reference used.
Constructor Details
NamespaceDecorator
publicNamespaceDecorator()
Constructor for the NamespaceDecorator object. A
namespace decorator can be used for applying namespaces to a
specified node. It can add namespaces to set the scope of the
namespace reference to the node and it can also be used to set
the primary namespace reference used for the node.
This is used to set the primary namespace for nodes that will
be decorated by the namespace decorator. If no namespace is set
using this method then this decorator will leave the namespace
reference unchanged and only add namespaces for scoping.
Parameters:
namespace - this is the primary namespace to be set
This is used to add a namespace to the decorator so that it can
be added to decorated nodes. Namespaces that are added will be
set on the element so that child elements can reference the
namespace and will thus inherit the prefix from that elment.
Parameters:
namespace - this is the namespace to be added for scoping
This method is used to decorate the provided node. This node
can be either an XML element or an attribute. Decorations that
can be applied to the node by invoking this method include
things like comments and namespaces.
This method is used to decorate the provided node. This node
can be either an XML element or an attribute. Decorations that
can be applied to the node by invoking this method include
things like namespaces and namespace lists. This can also be
given another Decorator which is applied before
this decorator, any common data can then be overwritten.
This is use to apply for NamespaceList annotations
on the node. If there is no namespace list then this will return
and the node will be left unchanged. If however the namespace
list is not empty the the namespaces are added.
Parameters:
node - this is the node to apply the namespace list to
This is use to apply the Namespace annotations on
the node. If there is no namespace then this will return and
the node will be left unchanged. If however the namespace is
not null then the reference is applied to the specified node.