|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.saxonica.schema.PathSelection
A PathSelection is a Selection that applies a NodeTest to each element between the context element and the node being tested, and returns true if they all match. This class is used internally in the validation of instance documents against uniqueness and identity constraints; it is not intended for use by user applications.
Constructor Summary | |
PathSelection(NodeTest[] tests,
boolean anchored,
NodeTest attributeTest)
Create a PathSelection - a limited form of XPath expression that can be evaluated on-the-fly |
Method Summary | |
boolean |
canMatchAttributes()
Determine whether the selection can match attribute nodes |
boolean |
canMatchElementContent()
Determin whether the selection can match element content |
NodeTest |
getAttributeTest()
|
ItemType |
getItemType()
Determine the item type of the nodes matched by the last NodeTest |
boolean |
matchesAttribute(int fingerprint)
Determine whether a given attribute matches the Selection |
boolean |
matchesElement(int[] stack,
int length,
int contextPosition)
Determine whether the selector matches a given element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PathSelection(NodeTest[] tests, boolean anchored, NodeTest attributeTest)
tests
- an array of node tests, representing a sequence of axis steps; these are all tests
on the child axis, except possibly the last, which is a test on the attribute axis if attributeTest is trueanchored
- if true, the first test applies to children of the root node; if false, it applies to
descendants of the root nodeattributeTest
- if true, the last test applies to attributes rather than elements.Method Detail |
public boolean matchesElement(int[] stack, int length, int contextPosition)
matchesElement
in interface Selection
stack
- the array of name fingerprintslength
- the effective length of the array; any items beyond this
position are ignoredcontextPosition
- the position in this array of the context element
for the selection.
public NodeTest getAttributeTest()
public boolean matchesAttribute(int fingerprint)
matchesAttribute
in interface Selection
public boolean canMatchAttributes()
canMatchAttributes
in interface Selection
public boolean canMatchElementContent()
canMatchElementContent
in interface Selection
public ItemType getItemType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |