org.apache.xerces.impl.xs.identity

Class Selector.Matcher

Enclosing Class:
Selector

public class Selector.Matcher
extends XPathMatcher

Selector matcher.
Author:
Andy Clark, IBM

Field Summary

protected int
fElementDepth
Element depth.
protected FieldActivator
fFieldActivator
Field activator.
protected int
fInitialDepth
Initial depth in the document at which this matcher was created.
protected int
fMatchedDepth
Depth at match.

Fields inherited from class org.apache.xerces.impl.xs.identity.XPathMatcher

DEBUG_ALL, DEBUG_ANY, DEBUG_MATCH, DEBUG_METHODS, DEBUG_METHODS2, DEBUG_METHODS3, DEBUG_STACK, MATCHED, MATCHED_ATTRIBUTE, MATCHED_DESCENDANT, MATCHED_DESCENDANT_PREVIOUS, fMatchedString

Constructor Summary

Matcher(Selector.XPath xpath, FieldActivator activator, int initialDepth)
Constructs a selector matcher.

Method Summary

void
endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xs.XSTypeDefinition type, boolean nillable, Object actualValue, short valueType, org.apache.xerces.xs.ShortList itemValueType)
IdentityConstraint
getIdentityConstraint()
Returns the identity constraint.
int
getInitialDepth()
get the initial depth at which this selector matched.
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.

Methods inherited from class org.apache.xerces.impl.xs.identity.XPathMatcher

endElement, handleContent, isMatched, matched, startDocumentFragment, startElement, toString

Field Details

fElementDepth

protected int fElementDepth
Element depth.

fFieldActivator

protected FieldActivator fFieldActivator
Field activator.

fInitialDepth

protected int fInitialDepth
Initial depth in the document at which this matcher was created.

fMatchedDepth

protected int fMatchedDepth
Depth at match.

Constructor Details

Matcher

public Matcher(Selector.XPath xpath,
               FieldActivator activator,
               int initialDepth)
Constructs a selector matcher.

Method Details

endElement

public void endElement(org.apache.xerces.xni.QName element,
                       org.apache.xerces.xs.XSTypeDefinition type,
                       boolean nillable,
                       Object actualValue,
                       short valueType,
                       org.apache.xerces.xs.ShortList itemValueType)
Overrides:
endElement in interface XPathMatcher
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.

getIdentityConstraint

public IdentityConstraint getIdentityConstraint()
Returns the identity constraint.

getInitialDepth

public int getInitialDepth()
get the initial depth at which this selector matched.

startDocumentFragment

public void startDocumentFragment()
The start of the document fragment.
Overrides:
startDocumentFragment in interface XPathMatcher

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.
Overrides:
startElement in interface XPathMatcher
Parameters:
element - The name of the element.
attributes - The element attributes.

Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.