Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      |
      +--org.apache.xerces.impl.xs.identity.XPathMatcher

Direct Known Subclasses:
  Field.Matcher, Selector.Matcher

public class XPathMatcher
extends java.lang.Object

XPath matcher.

Version:
  $Id: XPathMatcher.java,v 1.14 2003/01/14 20:21:46 elena Exp $
Author:
  Andy Clark, IBM

Field Summary
`protected static boolean` | `DEBUG_ALL` Compile to true to debug everything.
`protected static boolean` | `DEBUG_ANY` Don't touch this value unless you add more debug constants.
`protected static boolean` | `DEBUG_MATCH` Compile to true to debug match.
`protected static boolean` | `DEBUG_METHODS` Compile to true to debug method callbacks.
`protected static boolean` | `DEBUG_METHODS2` Compile to true to debug important method callbacks.
`protected static boolean` | `DEBUG_METHODS3` Compile to true to debug the really important methods.
`protected static boolean` | `DEBUG_STACK` Compile to true to debug step index stack.
`protected java.lang.String` | `fMatchedString` The matching string.
`protected SymbolTable` | `fSymbolTable`
`protected static int` | `MATCHED`
`protected static int` | `MATCHED_ATTRIBUTE`
`protected static int` | `MATCHED_DESCENDANT`
`protected static int` | `MATCHED_DESCENDANT_PREVIOUS`

Constructor Summary
`XPathMatcher(XPath xpath)` Constructs an XPath matcher that implements a document fragment handler.

Method Summary
`void` | `endElement(org.apache.xerces.xni.QName element, XSElementDecl eDecl, java.lang.String value)` The end of an element.
`java.lang.String` | `getMatchedString()` Returns the matched string.
`protected void` | `handleContent(XSElementDecl eDecl, java.lang.String value)`
`int` | `isMatched()` Returns value of first member of fMatched that is nonzero.
`protected void` | `matched(java.lang.String content, XSSimpleType val, boolean isNil)` This method is called when the XPath handler matches the XPath expression.
`void` | `startDocumentFragment(SymbolTable symbolTable)` The start of the document fragment.
`void` | `startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, XSElementDecl elementDecl)` The start of an element.
`java.lang.String` | `toString()` Returns a string representation of this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEBUG_ALL

    protected static final boolean DEBUG_ALL

  Compile to true to debug everything.

### 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_MATCH

    protected static final boolean DEBUG_MATCH

  Compile to true to debug match.

### DEBUG_STACK

    protected static final boolean DEBUG_STACK

  Compile to true to debug step index stack.

### DEBUG_ANY

    protected static final boolean DEBUG_ANY

  Don't touch this value unless you add more debug constants.

### 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 java.lang.String fMatchedString

  The matching string.

### fSymbolTable

    protected SymbolTable fSymbolTable

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 int isMatched()

  Returns value of first member of fMatched that is nonzero.

### getMatchedString

    public java.lang.String getMatchedString()

  Returns the matched string.

### handleContent

    protected void handleContent(XSElementDecl eDecl,
                                 java.lang.String value)

### matched

    protected void matched(java.lang.String content,
                           XSSimpleType val,
                           boolean isNil)
                    throws org.apache.xerces.xni.XNIException

  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(SymbolTable symbolTable)
                               throws org.apache.xerces.xni.XNIException

  The start of the document fragment.
  Parameters:
    `context` - The namespace scope in effect at the start of this document fragment.
  Throws:
    `org.apache.xerces.xni.XNIException` - Thrown by handler to signal an error.

### startElement

    public void startElement(org.apache.xerces.xni.QName element,
                             org.apache.xerces.xni.XMLAttributes attributes,
                             XSElementDecl elementDecl)
                      throws org.apache.xerces.xni.XNIException

  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.
    `elementDecl:` - The element declaration for the element
  Throws:
    `SAXException` - Thrown by handler to signal an error.

### endElement

    public void endElement(org.apache.xerces.xni.QName element,
                           XSElementDecl eDecl,
                           java.lang.String value)

  The end of an element.
  Parameters:
    `element` - The name of the element.
    `eDecl:` - the element declaration
    `ePSVI` - contains validation info for this element
  Throws:
    `SAXException` - Thrown by handler to signal an error.

### toString

    public java.lang.String toString()

  Returns a string representation of this object.
  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2003 Apache XML Project. All Rights Reserved.