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

## com.saxonica.schema
Interface Selection

All Known Implementing Classes:
  PathSelection, UnionSelection

public interface Selection

A selection represents the restricted form of path expression permitted in XML Schema (both the selector and field variants)

Method Summary
`boolean` | `canMatchAttributes()` Determine whether the selection can match attribute nodes
`boolean` | `canMatchElementContent()` Determin whether the selection can match element content
`boolean` | `matchesAttribute(int nameCode)` Determine whether a given attribute matches the Selection
`boolean` | `matchesElement(int[] stack, int length, int contextPosition)` Determine whether the selector matches a given element.

Method Detail

### matchesElement

    public boolean matchesElement(int[] stack,
                                  int length,
                                  int contextPosition)

  Determine whether the selector matches a given element. The element is identified by an array of integers representing the fingerprints of the names of this element and each of its ancestors, in document order (i.e., root element first, matched element last).

  Parameters:
    `stack` - the array of name fingerprints
    `length` - the effective length of the array; any items beyond this position are ignored
    `contextPosition` - the position in this array of the context element for the selection.
  Returns:
    true if the element matches

### matchesAttribute

    public boolean matchesAttribute(int nameCode)
                             throws ValidationException

  Determine whether a given attribute matches the Selection

  Returns:
    true if it matches, false if it does not match
  Throws:
    `ValidationException` - if there is more than one attribute that matches

### canMatchAttributes

    public boolean canMatchAttributes()

  Determine whether the selection can match attribute nodes

### canMatchElementContent

    public boolean canMatchElementContent()

  Determin whether the selection can match element content

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