org.apache.xerces.impl.xs.identity
Class XPathMatcher
java.lang.Object
org.apache.xerces.impl.xs.identity.XPathMatcher
public class XPathMatcher
extends java.lang.Object
XPath matcher.
$Id: XPathMatcher.java,v 1.26 2005/05/09 21:03:33 ankitp Exp $
XPathMatcher(XPath xpath) - Constructs an XPath matcher that implements a document fragment
handler.
|
void | endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xs.XSTypeDefinition type, boolean nillable, Object value, short valueType, org.apache.xerces.xs.ShortList itemValueType)
|
protected void | handleContent(org.apache.xerces.xs.XSTypeDefinition type, boolean nillable, Object value, short valueType, org.apache.xerces.xs.ShortList itemValueType)
|
boolean | isMatched() - Returns value of first member of fMatched that
is nonzero.
|
protected void | matched(Object actualValue, short valueType, org.apache.xerces.xs.ShortList itemValueType, boolean isNil) - This method is called when the XPath handler matches the
XPath expression.
|
void | startDocumentFragment() - The start of the document fragment.
|
void | startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes) - The start of an element.
|
String | toString() - Returns a string representation of this object.
|
DEBUG_ALL
protected static final boolean DEBUG_ALL
Compile to true to debug everything.
DEBUG_ANY
protected static final boolean DEBUG_ANY
Don't touch this value unless you add more debug constants.
DEBUG_MATCH
protected static final boolean DEBUG_MATCH
Compile to true to debug match.
DEBUG_METHODS
protected static final boolean DEBUG_METHODS
Compile to true to debug method callbacks.
DEBUG_METHODS2
protected static final boolean DEBUG_METHODS2
Compile to true to debug important method callbacks.
DEBUG_METHODS3
protected static final boolean DEBUG_METHODS3
Compile to true to debug the really important methods.
DEBUG_STACK
protected static final boolean DEBUG_STACK
Compile to true to debug step index stack.
MATCHED
protected static final int MATCHED
MATCHED_ATTRIBUTE
protected static final int MATCHED_ATTRIBUTE
MATCHED_DESCENDANT
protected static final int MATCHED_DESCENDANT
MATCHED_DESCENDANT_PREVIOUS
protected static final int MATCHED_DESCENDANT_PREVIOUS
fMatchedString
protected Object fMatchedString
The matching string.
XPathMatcher
public XPathMatcher(XPath xpath)
Constructs an XPath matcher that implements a document fragment
handler.
endElement
public void endElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xs.XSTypeDefinition type,
boolean nillable,
Object value,
short valueType,
org.apache.xerces.xs.ShortList itemValueType)
element
- name of the element.type
- content type of this element. IOW, the XML schema type
of the value. Note that this may not be the type declared
in the element declaration, but it is "the actual type". For example,
if the XML is <foo xsi:type="xs:string">aaa</foo>, this
parameter will be "xs:string".nillable
- - nillable
true if the element declaration is nillable.value
- - actual value
the typed value of the content of this element.
handleContent
protected void handleContent(org.apache.xerces.xs.XSTypeDefinition type,
boolean nillable,
Object value,
short valueType,
org.apache.xerces.xs.ShortList itemValueType)
isMatched
public boolean isMatched()
Returns value of first member of fMatched that
is nonzero.
matched
protected void matched(Object actualValue,
short valueType,
org.apache.xerces.xs.ShortList itemValueType,
boolean isNil)
This method is called when the XPath handler matches the
XPath expression. Subclasses can override this method to
provide default handling upon a match.
startDocumentFragment
public void startDocumentFragment()
The start of the document fragment.
startElement
public void startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes)
The start of an element. If the document specifies the start element
by using an empty tag, then the startElement method will immediately
be followed by the endElement method, with no intervening methods.
element
- The name of the element.attributes
- The element attributes.
toString
public String toString()
Returns a string representation of this object.
Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.