org.milyn.namespace
Class NamespaceDeclarationStack

java.lang.Object
  extended by org.milyn.namespace.NamespaceDeclarationStack

public class NamespaceDeclarationStack
extends Object

This class is responsible for managing namespace declarations.

Author:
zubairov

Constructor Summary
NamespaceDeclarationStack()
           
NamespaceDeclarationStack(XMLReader xmlReader)
           
 
Method Summary
 Map<String,String> getActiveNamespaces()
           
 String getPrefix(String uri)
           
 void popNamespaces()
          Pop element out of the namespace declaration stack and notifying ContentHandler if required.
 XMLReader popReader()
          Pop the current XMLReader off the XMLReader stack.
 Attributes pushNamespaces(String qName, String namespace, Attributes attributes)
          Pushing a new element to the stack.
 void pushReader(XMLReader reader)
          Push a new XMLReader instance onto the XMLReader Stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceDeclarationStack

public NamespaceDeclarationStack()

NamespaceDeclarationStack

public NamespaceDeclarationStack(XMLReader xmlReader)
Method Detail

pushNamespaces

public Attributes pushNamespaces(String qName,
                                 String namespace,
                                 Attributes attributes)
                          throws SAXException
Pushing a new element to the stack.

Parameters:
qName - Element QName.
namespace - Element namespace.
attributes - optional attributes or null, single element could declare multiple namespaces
Returns:
modified attributes declaration in case additional prefix mapping should be included
Throws:
SAXException - if an error is encountered when attempting to push the element to the stack.

popNamespaces

public void popNamespaces()
                   throws SAXException
Pop element out of the namespace declaration stack and notifying ContentHandler if required.

Throws:
SAXException - if an error occurs when attempting to pop the element out of the stack.

pushReader

public void pushReader(XMLReader reader)
Push a new XMLReader instance onto the XMLReader Stack.

Parameters:
reader - The reader instance.

popReader

public XMLReader popReader()
Pop the current XMLReader off the XMLReader stack.

Returns:
The reader instance that was popped from the stack.

getPrefix

public String getPrefix(String uri)

getActiveNamespaces

public Map<String,String> getActiveNamespaces()


Copyright © 2018. All rights reserved.