fi.hut.tml.xsmiles.mlfc.xforms.xpath.xalan
Class XPathLookup

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.xforms.xpath.xalan.XPathLookup
All Implemented Interfaces:
javax.xml.transform.ErrorListener, java.util.EventListener, org.apache.xalan.trace.TraceListener

public class XPathLookup
extends java.lang.Object
implements org.apache.xalan.trace.TraceListener, javax.xml.transform.ErrorListener

This class analyzes an XPath expression (possibly by executing it) and collects the referants of that expression. it is necessary to execute an arbitrary XPath expression and return the list of all nodes that the expression references in location paths. For instance, the following expression : "sum(/doc/item[@level='3']/@value) * /doc/tax/@tax" references value, level and tax attributes.

Author:
Mikko Honkala

Field Summary
protected static boolean canTrace
           
protected static java.lang.reflect.Method listenerSetter
           
protected  ModelContext modelContext
           
 
Constructor Summary
XPathLookup()
           
 
Method Summary
 void error(javax.xml.transform.TransformerException exception)
           
 void evalWithTrace(org.w3c.dom.Node contextNode, java.lang.String query, org.w3c.dom.Node namespaceNode, LookupResult result)
          evalutate the XPath and return the result & all referred nodes
 void fatalError(javax.xml.transform.TransformerException exception)
           
 void generated(org.apache.xalan.trace.GenerateEvent ev)
          Method that is called just after the formatter listener is called.
protected  void nodeSetSelected(org.apache.xml.dtm.DTMIterator nodes)
           
 void selected(org.apache.xalan.trace.SelectionEvent ev)
          Method that is called just after the formatter listener is called.
 void setModelContext(ModelContext context)
           
 void trace(org.apache.xalan.trace.TracerEvent ev)
          Method that is called when a trace event occurs.
 void warning(javax.xml.transform.TransformerException exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerSetter

protected static java.lang.reflect.Method listenerSetter

canTrace

protected static boolean canTrace

modelContext

protected ModelContext modelContext
Constructor Detail

XPathLookup

public XPathLookup()
Method Detail

setModelContext

public void setModelContext(ModelContext context)

nodeSetSelected

protected void nodeSetSelected(org.apache.xml.dtm.DTMIterator nodes)

trace

public void trace(org.apache.xalan.trace.TracerEvent ev)
Method that is called when a trace event occurs. The method is blocking. It must return before processing continues.

Specified by:
trace in interface org.apache.xalan.trace.TraceListener
Parameters:
ev - the trace event.

selected

public void selected(org.apache.xalan.trace.SelectionEvent ev)
              throws javax.xml.transform.TransformerException
Method that is called just after the formatter listener is called.

Specified by:
selected in interface org.apache.xalan.trace.TraceListener
Parameters:
ev - the generate event.
Throws:
javax.xml.transform.TransformerException

generated

public void generated(org.apache.xalan.trace.GenerateEvent ev)
Method that is called just after the formatter listener is called.

Specified by:
generated in interface org.apache.xalan.trace.TraceListener
Parameters:
ev - the generate event.

evalWithTrace

public void evalWithTrace(org.w3c.dom.Node contextNode,
                          java.lang.String query,
                          org.w3c.dom.Node namespaceNode,
                          LookupResult result)
                   throws javax.xml.transform.TransformerException
evalutate the XPath and return the result & all referred nodes

Parameters:
result - store the result in to this object
Throws:
javax.xml.transform.TransformerException

error

public void error(javax.xml.transform.TransformerException exception)
Specified by:
error in interface javax.xml.transform.ErrorListener

fatalError

public void fatalError(javax.xml.transform.TransformerException exception)
Specified by:
fatalError in interface javax.xml.transform.ErrorListener

warning

public void warning(javax.xml.transform.TransformerException exception)
Specified by:
warning in interface javax.xml.transform.ErrorListener


X-Smiles 1.2