|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tomp.ext.TreeSourceBuilder
Class serving as tree builder for those EXT Sources that need it.
Field Summary | |
protected Application |
application
|
protected net.sf.saxon.om.Builder |
builder
|
protected java.lang.String |
currentPrefix
|
protected java.lang.String |
currentURI
|
protected net.sf.saxon.om.NamePool |
namePool
|
protected int[] |
namespaces
|
protected int |
namespacesCount
|
protected int[] |
openElements
|
protected int |
openElementsCount
|
Constructor Summary | |
TreeSourceBuilder(Application app)
Constructs the TreeSourceBuilder. |
Method Summary | |
void |
addAttribute(java.lang.String localName,
java.lang.String value)
Adds attribute to the currently opened attribute collection. |
protected int |
allocate(java.lang.String localName)
|
protected int |
allocateNamespaceCode(java.lang.String prefix,
java.lang.String uri)
|
void |
endDocument()
End the current document. |
void |
endElement()
Closes the last open element. |
net.sf.saxon.om.Builder |
getBuilder()
|
protected void |
newAttributeCollection()
Creates a new empty attribute collection. |
void |
revertNS()
Reverts to the original Namespace. |
void |
startDocument()
Starts a new document. |
void |
startElement(int nameCode)
Starts a new element, using name code of the element to create. |
void |
startElement(java.lang.String localName)
Starts a new element, using currently selected Namespace and localname of the element to create. |
void |
switchNS(int namespaceCode)
The same but with Namespace code instead of URI. |
void |
switchNS(java.lang.String nsPrefix,
java.lang.String nsURI)
Switch to a new Namespace as default for further processing. |
void |
textElement(int nameCode,
java.lang.String text)
Creates a new text element, i.e. element with text-only content, using name code of the element to create. |
void |
textElement(java.lang.String localName,
java.lang.String text)
Creates a new text element, i.e. element with text-only content, using currently selected Namespace and localname of the element to create. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Application application
protected net.sf.saxon.om.NamePool namePool
protected net.sf.saxon.om.Builder builder
protected java.lang.String currentPrefix
protected java.lang.String currentURI
protected int[] openElements
protected int openElementsCount
protected int[] namespaces
protected int namespacesCount
Constructor Detail |
public TreeSourceBuilder(Application app)
Constructs the TreeSourceBuilder.
app
- application (used for getting new saxon tree Builder instances etc.)Method Detail |
public void switchNS(java.lang.String nsPrefix, java.lang.String nsURI)
Switch to a new Namespace as default for further processing.
nsURI
- URI of the new NamespacensPrefix
- prefix for the new Namespacepublic void switchNS(int namespaceCode)
The same but with Namespace code instead of URI.
public void revertNS()
Reverts to the original Namespace.
public void startDocument() throws javax.xml.transform.TransformerException
Starts a new document.
javax.xml.transform.TransformerException
public void endDocument() throws EXTException, javax.xml.transform.TransformerException
End the current document.
EXTException
javax.xml.transform.TransformerException
public void startElement(java.lang.String localName) throws javax.xml.transform.TransformerException
Starts a new element, using currently selected Namespace and localname of the element to create.
localName
- localname of the created element, uses the currently selected namespace.
After creation, the current attribute collection is erased (a new - empty - is created).
javax.xml.transform.TransformerException
public void startElement(int nameCode) throws javax.xml.transform.TransformerException
Starts a new element, using name code of the element to create.
nameCode
- name code of the created element.
After creation, the current attribute collection is erased (a new - empty - is created).
javax.xml.transform.TransformerException
public void endElement() throws javax.xml.transform.TransformerException
Closes the last open element.
javax.xml.transform.TransformerException
public void textElement(int nameCode, java.lang.String text) throws javax.xml.transform.TransformerException
Creates a new text element, i.e. element with text-only content, using name code of the element to create.
nameCode
- name code of the created element.text
- String content of the new element.
After creation, the current attribute collection is erased (a new - empty - is created).
javax.xml.transform.TransformerException
public void textElement(java.lang.String localName, java.lang.String text) throws javax.xml.transform.TransformerException
Creates a new text element, i.e. element with text-only content, using currently selected Namespace and localname of the element to create.
localName
- local name of the created element.text
- String content of the new element.
After creation, the current attribute collection is erased (a new - empty - is created).
javax.xml.transform.TransformerException
public void addAttribute(java.lang.String localName, java.lang.String value) throws javax.xml.transform.TransformerException
Adds attribute to the currently opened attribute collection.
localName
- local name of the atribute (uses current Namespace)value
- value of the attribute
javax.xml.transform.TransformerException
protected void newAttributeCollection()
Creates a new empty attribute collection. The old one is forgotten.
public net.sf.saxon.om.Builder getBuilder()
protected int allocate(java.lang.String localName)
protected int allocateNamespaceCode(java.lang.String prefix, java.lang.String uri)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |