APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.org.apache.xerces.internal.xpointer

pack-priv final Class ElementSchemePointer

extends Object
implements XPointerPart
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xerces.internal.xpointer.XPointerPart
Imports
java.util.HashMap, com.sun.org.apache.xerces.internal.impl.XMLErrorReporter, com.sun.org.apache.xerces.internal.util.SymbolTable, .XMLChar, com.sun.org.apache.xerces.internal.xni.Augmentations, .QName, .XMLAttributes, .XNIException, com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler

Implements the XPointerPart interface for element() scheme specific processing.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
ElementSchemePointer.Scanner

The XPointer expression scanner.

private class
ElementSchemePointer.Tokens

List of XPointer Framework tokens.

Field Summary

Modifier and TypeField and Description
private int[]
private int
private int
private int[]
protected XMLErrorHandler
protected XMLErrorReporter
pack-priv int
private boolean
private boolean
private boolean
pack-priv boolean
private String
private String
private ShortHandPointer
private String
private SymbolTable
private boolean

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
protected boolean

Returns:

boolean
checkMatch
()

Matches the current position of the element being visited by checking its position and previous elements against the element XPointer expression.

public String
public String
protected void
init()

Initializes the element scheme processor

protected void
initErrorReporter()

Initializes error handling objects

public boolean
isChildFragmentResolved()

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.isChildFragmentResolved.

Returns true if the XPointer expression resolves to a non-element child of the current resource fragment.

public boolean
isFragmentResolved()

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.isFragmentResolved.

Returns true if the node matches or is a child of a matching element() scheme XPointer.

protected boolean

Returns:

boolean - true if the current element position in the document tree matches theelement position specified in the element XPointer scheme.
matchChildSequence
(QName element, int event)

Matches the current element position in the document tree with the element position specified in the element XPointer scheme.

public void
parseXPointer(String xpointer)

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.parseXPointer.

Parses the XPointer expression and tokenizes it into Strings delimited by whitespace.

protected void
reportError(String key, Object[] arguments)

Reports an XPointer error

public boolean
resolveXPointer(QName element, XMLAttributes attributes, Augmentations augs, int event)

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.resolveXPointer.

Responsible for resolving the element() scheme XPointer.

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fChildSequenceback to summary
private int[] fChildSequence
fCurrentChildDepthback to summary
private int fCurrentChildDepth
fCurrentChildPositionback to summary
private int fCurrentChildPosition
fCurrentChildSequenceback to summary
private int[] fCurrentChildSequence
fErrorHandlerback to summary
protected XMLErrorHandler fErrorHandler
fErrorReporterback to summary
protected XMLErrorReporter fErrorReporter
fFoundDepthback to summary
pack-priv int fFoundDepth
fIsElementFoundback to summary
private boolean fIsElementFound
fIsFragmentResolvedback to summary
private boolean fIsFragmentResolved
fIsResolveElementback to summary
private boolean fIsResolveElement
fIsShortHandback to summary
pack-priv boolean fIsShortHand
fSchemeDataback to summary
private String fSchemeData
fSchemeNameback to summary
private String fSchemeName
fShortHandPointerback to summary
private ShortHandPointer fShortHandPointer
fShortHandPointerNameback to summary
private String fShortHandPointerName
fSymbolTableback to summary
private SymbolTable fSymbolTable
fWasOnlyEmptyElementFoundback to summary
private boolean fWasOnlyEmptyElementFound

Constructor Detail

ElementSchemePointerback to summary
public ElementSchemePointer()
ElementSchemePointerback to summary
public ElementSchemePointer(SymbolTable symbolTable)
ElementSchemePointerback to summary
public ElementSchemePointer(SymbolTable symbolTable, XMLErrorReporter errorReporter)

Method Detail

checkMatchback to summary
protected boolean checkMatch()

Matches the current position of the element being visited by checking its position and previous elements against the element XPointer expression. If a match is found it return true else false.

Returns:boolean

boolean

getSchemeDataback to summary
public String getSchemeData()

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.getSchemeData.

Returns the scheme data

See Also
com.sun.org.apache.xerces.internal.xpointer.XPointerPart#getSchemeData()
getSchemeNameback to summary
public String getSchemeName()

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.getSchemeName.

Returns the scheme name i.e element

See Also
com.sun.org.apache.xerces.internal.xpointer.XPointerPart#getSchemeName()
initback to summary
protected void init()

Initializes the element scheme processor

initErrorReporterback to summary
protected void initErrorReporter()

Initializes error handling objects

isChildFragmentResolvedback to summary
public boolean isChildFragmentResolved()

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.isChildFragmentResolved.

Returns true if the XPointer expression resolves to a non-element child of the current resource fragment.

See Also
com.sun.org.apache.xerces.internal.xpointer.XPointerPart#isChildFragmentResolved()
isFragmentResolvedback to summary
public boolean isFragmentResolved() throws XNIException

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.isFragmentResolved.

Returns true if the node matches or is a child of a matching element() scheme XPointer.

Exceptions
XNIException:

Doc from com.sun.org.apache.xerces.internal.xpointer.XPointerPart.isFragmentResolved.

Thrown to signal an error

See Also
com.sun.org.apache.xerces.internal.xpointer.XPointerProcessor#isFragmentResolved()
matchChildSequenceback to summary
protected boolean matchChildSequence(QName element, int event) throws XNIException

Matches the current element position in the document tree with the element position specified in the element XPointer scheme.

Returns:boolean

boolean - true if the current element position in the document tree matches theelement position specified in the element XPointer scheme.

parseXPointerback to summary
public void parseXPointer(String xpointer) throws XNIException

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.parseXPointer.

Parses the XPointer expression and tokenizes it into Strings delimited by whitespace.

Exceptions
XNIException:

Doc from com.sun.org.apache.xerces.internal.xpointer.XPointerPart.parseXPointer.

Thrown if the PointerPart string does not conform to the syntax defined by its scheme.

See Also
com.sun.org.apache.xerces.internal.xpointer.XPointerProcessor#parseXPointer(java.lang.String)
reportErrorback to summary
protected void reportError(String key, Object[] arguments) throws XNIException

Reports an XPointer error

resolveXPointerback to summary
public boolean resolveXPointer(QName element, XMLAttributes attributes, Augmentations augs, int event) throws XNIException

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.resolveXPointer.

Responsible for resolving the element() scheme XPointer. If a ShortHand Pointer is present and it is successfully resolved and if a child sequence is present, the child sequence is resolved relative to it.

Exceptions
XNIException:

Doc from com.sun.org.apache.xerces.internal.xpointer.XPointerPart.resolveXPointer.

Thrown to signal an error

See Also
com.sun.org.apache.xerces.internal.xpointer.XPointerProcessor#resolveXPointer(com.sun.org.apache.xerces.internal.xni.QName, com.sun.org.apache.xerces.internal.xni.XMLAttributes, com.sun.org.apache.xerces.internal.xni.Augmentations, int event)
setSchemeDataback to summary
public void setSchemeData(String schemeData)

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.setSchemeData.

Sets the scheme data

See Also
com.sun.org.apache.xerces.internal.xpointer.XPointerPart#setSchemeData(java.lang.String)
setSchemeNameback to summary
public void setSchemeName(String schemeName)

Implements com.sun.org.apache.xerces.internal.xpointer.XPointerPart.setSchemeName.

Sets the scheme name

See Also
com.sun.org.apache.xerces.internal.xpointer.XPointerPart#setSchemeName(java.lang.String)
com.sun.org.apache.xerces.internal.xpointer back to summary

private Class ElementSchemePointer.Scanner

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xerces.internal.xpointer.ElementSchemePointer.Scanner

The XPointer expression scanner. Scans the XPointer framework expression.

Field Summary

Modifier and TypeField and Description
private static final byte
CHARTYPE_DIGIT

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private static final byte
CHARTYPE_INVALID

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private static final byte
CHARTYPE_LETTER

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private static final byte
CHARTYPE_MINUS

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private static final byte
CHARTYPE_NONASCII

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private static final byte
CHARTYPE_OTHER

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private static final byte
CHARTYPE_PERIOD

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private static final byte
CHARTYPE_SLASH

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private static final byte
CHARTYPE_UNDERSCORE

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

private final byte[]
private SymbolTable
fSymbolTable

Symbol table.

Constructor Summary

AccessConstructor and Description
private
Scanner(SymbolTable
SymbolTable
symbolTable
)

Constructs an XPath expression scanner.

Method Summary

Modifier and TypeMethod and Description
protected void
addToken(ElementSchemePointer.Tokens tokens, int token)

This method adds the specified token to the token list.

private boolean
scanExpr(SymbolTable symbolTable, ElementSchemePointer.Tokens tokens, String data, int currentOffset, int endOffset)

Scans the XPointer Expression

private int
scanNCName(String
A String containing the XPointer expression
data
,
int
The int XPointer expression length
endOffset
,
int
An int representing the current position of the XPointer expression pointer
currentOffset
)

Scans a NCName.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHARTYPE_DIGITback to summary
private static final byte CHARTYPE_DIGIT

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

CHARTYPE_INVALIDback to summary
private static final byte CHARTYPE_INVALID

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

CHARTYPE_LETTERback to summary
private static final byte CHARTYPE_LETTER

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

CHARTYPE_MINUSback to summary
private static final byte CHARTYPE_MINUS

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

CHARTYPE_NONASCIIback to summary
private static final byte CHARTYPE_NONASCII

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

CHARTYPE_OTHERback to summary
private static final byte CHARTYPE_OTHER

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

CHARTYPE_PERIODback to summary
private static final byte CHARTYPE_PERIOD

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

CHARTYPE_SLASHback to summary
private static final byte CHARTYPE_SLASH

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

CHARTYPE_UNDERSCOREback to summary
private static final byte CHARTYPE_UNDERSCORE

7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, // 4 P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, // 5 `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, // 6 p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, DEL // 7

fASCIICharMapback to summary
private final byte[] fASCIICharMap
fSymbolTableback to summary
private SymbolTable fSymbolTable

Symbol table.

Constructor Detail

Scannerback to summary
private Scanner(SymbolTable symbolTable)

Constructs an XPath expression scanner.

Parameters
symbolTable:SymbolTable

SymbolTable

Method Detail

addTokenback to summary
protected void addToken(ElementSchemePointer.Tokens tokens, int token) throws XNIException

This method adds the specified token to the token list. By default, this method allows all tokens. However, subclasses of the XPathExprScanner can override this method in order to disallow certain tokens from being used in the scanned XPath expression. This is a convenient way of allowing only a subset of XPath.

scanExprback to summary
private boolean scanExpr(SymbolTable symbolTable, ElementSchemePointer.Tokens tokens, String data, int currentOffset, int endOffset) throws XNIException

Scans the XPointer Expression

scanNCNameback to summary
private int scanNCName(String data, int endOffset, int currentOffset)

Scans a NCName. From Namespaces in XML [5] NCName ::= (Letter | '_') (NCNameChar)* [6] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender

Parameters
data:String

A String containing the XPointer expression

endOffset:int

The int XPointer expression length

currentOffset:int

An int representing the current position of the XPointer expression pointer

com.sun.org.apache.xerces.internal.xpointer back to summary

private final Class ElementSchemePointer.Tokens

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xerces.internal.xpointer.ElementSchemePointer.Tokens

List of XPointer Framework tokens.
Author
Neil Delima, IBM

Field Summary

Modifier and TypeField and Description
private int
private final String[]
private SymbolTable
private int
private HashMap<Integer, String>
private int[]
private static final int
private static final int
private static final int
XPTRTOKEN_ELEM_NCNAME

XPointer element() scheme [1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence [2] ChildSequence ::= ('/' [1-9] [0-9]*)+

Constructor Summary

AccessConstructor and Description
private
Tokens(SymbolTable
SymbolTable
symbolTable
)

Constructor

Method Summary

Modifier and TypeMethod and Description
private void
addToken(String tokenStr)

Add the specified string as a token

private void
addToken(int
The int specifying the token
token
)

Add the specified int token

private int
getTokenCount()

Returns the number of tokens.

private String
getTokenString(int token)

private boolean
hasMore()

Returns true if the getNextToken() method returns a valid token.

private int
nextToken()

Obtains the token at the current position, then advance the current position by one.

private String
nextTokenAsString()

Obtains the token at the current position as a String.

private int
peekToken()

Obtains the token at the current position, without advancing the current position.

private void
rewind()

Resets the current position to the head of the token list.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fCurrentTokenIndexback to summary
private int fCurrentTokenIndex
fgTokenNamesback to summary
private final String[] fgTokenNames
fSymbolTableback to summary
private SymbolTable fSymbolTable
fTokenCountback to summary
private int fTokenCount
fTokenNamesback to summary
private HashMap<Integer, String> fTokenNames
fTokensback to summary
private int[] fTokens
INITIAL_TOKEN_COUNTback to summary
private static final int INITIAL_TOKEN_COUNT
XPTRTOKEN_ELEM_CHILDback to summary
private static final int XPTRTOKEN_ELEM_CHILD
XPTRTOKEN_ELEM_NCNAMEback to summary
private static final int XPTRTOKEN_ELEM_NCNAME

XPointer element() scheme [1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence [2] ChildSequence ::= ('/' [1-9] [0-9]*)+

Constructor Detail

Tokensback to summary
private Tokens(SymbolTable symbolTable)

Constructor

Parameters
symbolTable:SymbolTable

SymbolTable

Method Detail

addTokenback to summary
private void addToken(String tokenStr)

Add the specified string as a token

addTokenback to summary
private void addToken(int token)

Add the specified int token

Parameters
token:int

The int specifying the token

getTokenCountback to summary
private int getTokenCount()

Returns the number of tokens.

getTokenStringback to summary
private String getTokenString(int token)
hasMoreback to summary
private boolean hasMore()

Returns true if the getNextToken() method returns a valid token.

nextTokenback to summary
private int nextToken() throws XNIException

Obtains the token at the current position, then advance the current position by one. If there's no such next token, this method throws new XNIException("InvalidXPointerExpression");.

nextTokenAsStringback to summary
private String nextTokenAsString() throws XNIException

Obtains the token at the current position as a String. If there's no current token or if the current token is not a string token, this method throws If there's no such next token, this method throws new XNIException("InvalidXPointerExpression");.

peekTokenback to summary
private int peekToken() throws XNIException

Obtains the token at the current position, without advancing the current position. If there's no such next token, this method throws new XNIException("InvalidXPointerExpression");.

rewindback to summary
private void rewind()

Resets the current position to the head of the token list.