|
Devsphere.com |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.devsphere.xml.taglib.process.builder.Controller
This class implements com.devsphere.xml.saxdomix.SDXController
to generate JSP code for handling the DOM sub-trees.
An instance of this class is created by a Main object,
which is referred further as SAXDOMIX builder because it inherits
com.devsphere.xml.saxdomix.SDXBuilder through
com.devsphere.xml.taglib.support.builder.BuilderSupport.
| Constructor Summary | |
Controller(Parameters params,
Outputter out)
Initializes the controller. |
|
| Method Summary | |
void |
handleDOM(org.w3c.dom.Element element)
Generates code for handling a DOM sub-tree. |
boolean |
wantDOM(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes)
Generates code for handling a DOM sub-tree. |
protected void |
xpathExpressions(java.lang.String xpath,
org.w3c.dom.Element context)
Generates a list of valid XPath expressions that can be evaluated in the given context. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Controller(Parameters params,
Outputter out)
params - the command line parametersout - the object used to output the generated code| Method Detail |
public boolean wantDOM(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
true when the application wants to receive a DOM
sub-tree for handling. This happens when the qualified name of the
current element was specified in the rootElements list.
During the SAX parsing of the XML sample, a builder object
invokes the controller's wantDOM() method for each
startElement() parsing event. If wantDOM()
returns false the SAX parsing mode continues.
When wantDOM() returns true the builder
enters in DOM parsing mode and starts creating a DOM sub-tree from
all SAX events between the current startElement()
and the corresponding endElement().
wantDOM in interface SDXControllernamespaceURI - The element's namespace URIlocalName - The element's local namequalifiedName - The element's qualified nameattributes - The element's attributes
org.xml.sax.SAXException - If an error must be signaled
public void handleDOM(org.w3c.dom.Element element)
throws org.xml.sax.SAXException
xpathExpressions() to generate a list of valid XPath
expressions that can be evaluated in the context of the sample
DOM sub-tree.
After wantDOM() returns true, the builder
constructs a DOM sub-tree from SAX events and passes it to the
controller's handleDOM() method. After handling, the builder
returns to the SAX parsing mode.
handleDOM in interface SDXControllerelement - The root of the DOM sub-tree
org.xml.sax.SAXException - If an error must be signaled
protected void xpathExpressions(java.lang.String xpath,
org.w3c.dom.Element context)
xpath - The expression used to refer the DOM sub-tree.context - The root of the DOM sub-tree whose XPaths
must be generated.
|
Devsphere.com |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||