Package com.sun.xml.wss.impl.transform
Class NameSpaceSymbTable
java.lang.Object
com.sun.xml.wss.impl.transform.NameSpaceSymbTable
A stack based Symble Table.
For speed reasons all the symbols are introduced in the same map, and at the same time in a list so it can be removed when the frame is pop back.
For speed reasons all the symbols are introduced in the same map, and at the same time in a list so it can be removed when the frame is pop back.
- Author:
- Raul Benito
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddMapping(String prefix, String uri, Attr n) Adds the mapping for a prefix.addMappingAndRender(String prefix, String uri, Attr n) Adds a definition and mark it as render.addMappingAndRenderXNodeSet(String prefix, String uri, Attr n, boolean outputNode) Adds and gets(if needed) the attribute node that defines the binding for the prefix.getMapping(String prefix) Gets the attribute node that defines the binding for the prefix.getMappingWithoutRendered(String prefix) Gets a definition without mark it as render.voidgetUnrenderedNodes(Collection result) Get all the unrendered nodes in the name space.voidPop a frame for visible namespace.voidPush a frame for visible namespace.voidpop()Pop a frame.voidpush()Push a frame for a node.
-
Constructor Details
-
NameSpaceSymbTable
public NameSpaceSymbTable()Default constractor
-
-
Method Details
-
getUnrenderedNodes
Get all the unrendered nodes in the name space. For Inclusive rendering- Parameters:
result- the list where to fill the unrendered xmlns definitions.
-
outputNodePush
public void outputNodePush()Push a frame for visible namespace. For Inclusive rendering. -
outputNodePop
public void outputNodePop()Pop a frame for visible namespace. -
push
public void push()Push a frame for a node. Inclusive or Exclusive. -
pop
public void pop()Pop a frame. Inclusive or Exclusive. -
getMapping
Gets the attribute node that defines the binding for the prefix.- Parameters:
prefix- the prefix to obtain the attribute.- Returns:
- null if there is no need to render the prefix. Otherwise the node of definition.
-
getMappingWithoutRendered
Gets a definition without mark it as render. For render in exclusive c14n the namespaces in the include prefixes.- Parameters:
prefix- The prefix whose definition is neaded.- Returns:
- the attr to render, null if there is no need to render
-
addMapping
Adds the mapping for a prefix.- Parameters:
prefix- the prefix of definitionuri- the Uri of the definitionn- the attribute that have the definition- Returns:
- true if there is already defined.
-
addMappingAndRender
Adds a definition and mark it as render. For inclusive c14n.- Parameters:
prefix- the prefix of definitionuri- the Uri of the definitionn- the attribute that have the definition- Returns:
- the attr to render, null if there is no need to render
-
addMappingAndRenderXNodeSet
Adds and gets(if needed) the attribute node that defines the binding for the prefix. Take on account if the rules of rendering in the inclusive c14n. For inclusive c14n.- Parameters:
prefix- the prefix to obtain the attribute.outputNode- the container element is an output element.uri- the Uri of the definitionn- the attribute that have the definition- Returns:
- null if there is no need to render the prefix. Otherwise the node of definition.
-