|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.joost.stx.Parser
public class Parser
Creates the tree representation of an STX transformation sheet. The Parser object acts as a SAX ContentHandler.
Field Summary | |
---|---|
private StringBuffer |
collectedCharacters
Buffer for collecting consecutive character data |
Vector |
compilableNodes
List of nodes that need another call to NodeBase.compile(int, net.sf.joost.stx.ParseContext) |
private NodeBase |
currentNode
The current (last created) Node. |
GroupBase |
includingGroup
Group which had an stx:include , which in turn created
this Parser object |
private Hashtable |
inScopeNamespaces
Hashtable: keys = prefixes, values = URI stacks |
private Hashtable |
joostFactories
Hashtable for Joost extension factory objects, one for each type. |
private LitElementFactory |
litFac
The factory for literal result elements. |
private Hashtable |
newNamespaces
Hashtable for newly declared namespaces between literal elements; keys = prefixes, values = URIs |
private Stack |
openedElements
Stack for opened elements, contains Node instances. |
private ParserListener |
parserListener
An optional ParserListener |
private ParseContext |
pContext
The context object for parsing |
private Hashtable |
stxFactories
Hashtable for STX factory objects, one for each type. |
Fields inherited from interface net.sf.joost.Constants |
---|
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS |
Constructor Summary | |
---|---|
Parser(ParseContext pContext)
Constructs a new Parser instance. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
private Hashtable |
createFactoryMap(FactoryBase[] data)
creates hashtable and sets its initial content to the given array |
void |
endDocument()
|
void |
endElement(String uri,
String lName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
Map |
getFactories()
|
Hashtable |
getInScopeNamespaces()
Constructs a hashtable containing a mapping from all namespace prefixes in scope to their URIs. |
TransformFactory.Instance |
getTransformNode()
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
private void |
processCharacters()
Processes collected character fragments |
void |
processingInstruction(String target,
String data)
|
void |
setDocumentLocator(Locator locator)
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String uri,
String lName,
String qName,
Attributes attrs)
|
void |
startPrefixMapping(String prefix,
String uri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ParseContext pContext
private Stack openedElements
private NodeBase currentNode
private Hashtable stxFactories
private Hashtable joostFactories
private LitElementFactory litFac
private Hashtable inScopeNamespaces
private Hashtable newNamespaces
public Vector compilableNodes
NodeBase.compile(int, net.sf.joost.stx.ParseContext)
public GroupBase includingGroup
stx:include
, which in turn created
this Parser object
private ParserListener parserListener
private StringBuffer collectedCharacters
Constructor Detail |
---|
public Parser(ParseContext pContext)
Method Detail |
---|
private Hashtable createFactoryMap(FactoryBase[] data)
data
- to be filled in the map
public Map getFactories()
public TransformFactory.Instance getTransformNode()
stx:transform
.private void processCharacters() throws SAXParseException
SAXParseException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startElement(String uri, String lName, String qName, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String uri, String lName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
public void ignorableWhitespace(char[] ch, int start, int length)
ignorableWhitespace
in interface ContentHandler
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri)
startPrefixMapping
in interface ContentHandler
public void endPrefixMapping(String prefix)
endPrefixMapping
in interface ContentHandler
public void skippedEntity(String name)
skippedEntity
in interface ContentHandler
public Hashtable getInScopeNamespaces()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |