|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectcom.saxonica.schema.UnionSelection
public class UnionSelection
A union selection is a selection consisting of several alternatives separated by "|"
| Field Summary |
|---|
| Fields inherited from interface com.saxonica.schema.Selection |
|---|
MATCHES_AS_PARENT, MATCHES_AS_SELF |
| Constructor Summary | |
|---|---|
UnionSelection(Selection p1,
Selection p2)
Create a union selection |
|
| Method Summary | |
|---|---|
boolean |
canMatchAttributes()
Determine whether the selection can match attribute nodes |
boolean |
canMatchElementContent()
Determine whether the selection can match element content |
void |
displayExpression(ExpressionPresenter out)
Diagnostic print of expression structure. |
ItemType |
getItemType(TypeHierarchy th)
Return the type of the nodes selected by this selection |
boolean |
matchesAttribute(int fingerprint)
Determine whether a given attribute matches the Selection |
int |
matchesElement(int[] stack,
int length,
int contextPosition)
Determine whether the selector matches a given element. |
java.lang.String |
typeCheck(ExpressionVisitor visitor,
ItemType contextItemType)
Check that the selection makes sense in the context of a given ItemType. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnionSelection(Selection p1,
Selection p2)
p1 - the first alternativep2 - the second alternative| Method Detail |
|---|
public int matchesElement(int[] stack,
int length,
int contextPosition)
matchesElement in interface Selectionstack - 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 boolean matchesAttribute(int fingerprint)
throws ValidationException
matchesAttribute in interface Selectionfingerprint - the integer nameCode of an attribute
ValidationException - if there is more than one
attribute that matchespublic boolean canMatchAttributes()
canMatchAttributes in interface Selectionpublic boolean canMatchElementContent()
canMatchElementContent in interface Selection
public java.lang.String typeCheck(ExpressionVisitor visitor,
ItemType contextItemType)
typeCheck in interface Selectionvisitor - the expression visitorcontextItemType - the type of the context item
public ItemType getItemType(TypeHierarchy th)
getItemType in interface Selectionth - the type hierarchy cache
public void displayExpression(ExpressionPresenter out)
displayExpression in interface Selectionout - the place where the structure is to be written
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||