Package org.smooks.namespace
Class NamespaceDeclarationStack
- java.lang.Object
-
- org.smooks.namespace.NamespaceDeclarationStack
-
public class NamespaceDeclarationStack extends Object
This class is responsible for managing namespace declarations.- Author:
- zubairov
-
-
Constructor Summary
Constructors Constructor Description NamespaceDeclarationStack()NamespaceDeclarationStack(XMLReader xmlReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getActiveNamespaces()StringgetPrefix(String uri)voidpopNamespaces()Pop element out of the namespace declaration stack and notifyingContentHandlerif required.XMLReaderpopReader()Pop the current XMLReader off the XMLReader stack.AttributespushNamespaces(String qName, String namespace, Attributes attributes)Pushing a new element to the stack.voidpushReader(XMLReader reader)Push a new XMLReader instance onto the XMLReader Stack.
-
-
-
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 SAXExceptionPop element out of the namespace declaration stack and notifyingContentHandlerif 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.
-
-