Search this API

y.io.graphml.output
Interface XmlNamespaceManager


public interface XmlNamespaceManager

Helper interface to facilitate namespace handling together with XmlWriter instances.

Usually, this interface is used only internally by a suitable XmlWriter instance

 
Your browser does not support SVG content.

Method Summary
 java.lang.String getNamespaceOfPrefix(java.lang.String prefix)
          Gets the registered XML namespace URI of prefix.
 java.lang.String getPrefixOfNamespace(java.lang.String ns)
          Gets the registered XML prefix of ns.
 void popScope()
          Pops a current declaration scope.
 void pushScope()
          Pushes a current declaration scope.
 void redeclareLocalMapping(java.lang.String nsUri, java.lang.String prefix)
          Register a local namespace/prefix mapping.
 void registerLocalMapping(java.lang.String nsUri, java.lang.String prefix)
          Register a local namespace/prefix mapping.
 

Method Detail

getPrefixOfNamespace

java.lang.String getPrefixOfNamespace(java.lang.String ns)
Gets the registered XML prefix of ns.

Parameters:
ns - The namespace URI for which a prefix is searched.
Returns:
The registered XML prefix of ns.

getNamespaceOfPrefix

java.lang.String getNamespaceOfPrefix(java.lang.String prefix)
Gets the registered XML namespace URI of prefix. If the prefix is redeclared, the nearest enclosing declaration (at the time of this method call) is used.

Parameters:
prefix - The prefix for which a namespace URI is searched.
Returns:
The namespace URI of prefix.

registerLocalMapping

void registerLocalMapping(java.lang.String nsUri,
                          java.lang.String prefix)
Register a local namespace/prefix mapping. If a different mapping is already in use on the current element, an exception is thrown

Parameters:
nsUri - The namespace URI
prefix - The namespace prefix.

redeclareLocalMapping

void redeclareLocalMapping(java.lang.String nsUri,
                           java.lang.String prefix)
Register a local namespace/prefix mapping. This overwrites any mappings in the current context, regardless of whether they have been already used and is therefore only safe to use if a new element is started.

Parameters:
nsUri - The namespace URI
prefix - The namespace prefix.

pushScope

void pushScope()
Pushes a current declaration scope.


popScope

void popScope()
Pops a current declaration scope.


© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.