Class Token.ComplexToken

java.lang.Object
net.sf.saxon.expr.parser.Token
net.sf.saxon.expr.parser.Token.ComplexToken
Direct Known Subclasses:
Token.DirectElementConstructor, Token.StringConstructor, Token.StringTemplate
Enclosing class:
Token

public abstract static class Token.ComplexToken extends Token
A "complex token" is used to represent constructs like element constructors and string templates that contain embedded expressions within arbitrary character content..

When a complex token is encountered (during lookAhead processing) it is not read to completion, it is saved for later processing. When the parser retrieves a complex token it must parse it by reading individual characters.

The complex token provides methods to read and unread characters and to process embedded expressions. When the parser has finished reading the token, it should call the close() method, which resets the tokenizer so that parsing can continue normally.

  • Field Details

    • tokenizer

      protected final Tokenizer tokenizer
    • startOffset

      protected int startOffset
    • tokenType

      protected String tokenType
  • Constructor Details

    • ComplexToken

      public ComplexToken(Tokenizer tokenizer, String input, int startOffset)
  • Method Details