org.apache.xerces.impl.xs.identity
Class XPathMatcher

java.lang.Object
  extended by org.apache.xerces.impl.xs.identity.XPathMatcher
Direct Known Subclasses:
Selector.Matcher

public class XPathMatcher
extends java.lang.Object

XPath matcher.

Version:
$Id: XPathMatcher.java 572110 2007-09-02 19:04:44Z mrglavas $
Author:
Andy Clark, IBM

Constructor Summary
XPathMatcher(XPath xpath)
          Constructs an XPath matcher that implements a document fragment handler.
 
Method Summary
 void endElement(QName element, XSTypeDefinition type, boolean nillable, java.lang.Object value, short valueType, ShortList itemValueType)
           
 boolean isMatched()
          Returns value of first member of fMatched that is nonzero.
 void startDocumentFragment()
          The start of the document fragment.
 void startElement(QName element, XMLAttributes attributes)
          The start of an element.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XPathMatcher

public XPathMatcher(XPath xpath)
Constructs an XPath matcher that implements a document fragment handler.

Parameters:
xpath - The xpath.
Method Detail

isMatched

public boolean isMatched()
Returns value of first member of fMatched that is nonzero.


startDocumentFragment

public void startDocumentFragment()
The start of the document fragment.


startElement

public void startElement(QName element,
                         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.

Parameters:
element - The name of the element.
attributes - The element attributes.
Throws:
SAXException - Thrown by handler to signal an error.

endElement

public void endElement(QName element,
                       XSTypeDefinition type,
                       boolean nillable,
                       java.lang.Object value,
                       short valueType,
                       ShortList itemValueType)
Parameters:
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.

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object