All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface oracle.xml.parser.v2.XMLToken

public interface XMLToken
Basic interface for XMLToken

All XMLParser applications with Tokenizer feature must implement this interface. The interface has to be registered using XMLParser method setTokenHandler(XMLToken handler).

If XMLtoken handler != null then for each registered and found token the parser calls the XMLToken call-back method token(int token, String value). During tokenizing the parser doesn't validate the document and doesn't include/read internal/external entities. If XMLtoken handler == null then the parser parses as usual.

A request for XML token is registered (on/off) using XMLParser method setToken (int token, boolean set). The requests could be registered during the parsing (from inside the call-back method) as well.

The XML tokens are defined as public constants in XMLToken interface. They correspond to the XML syntax variables from W3C XML Syntax Specification.


Variable Index

 o AttListDecl

AttListDecl ::= '<' '!' 'ATTLIST' S Name AttDef* S? '>'

 o AttName

AttName ::= Name

 o Attribute

Attribute ::= AttName Eq AttValue

 o AttValue

AttValue ::= '"' ([^<&"] | Reference)* '"'

| "'" ([^<&'] | Reference)* "'"

 o CDSect

CDSect ::= CDStart CData CDEnd

CDStart ::= '<' '!' '[CDATA['

CData ::= (Char* - (Char* ']]>' Char*))

CDEnd ::= ']]>'

 o CharData

CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

 o Comment

Comment ::= '<' '!' '--' ((Char - '-') | ('-' (Char - '-')))* '-->'

 o DTDName

DTDName ::= name

 o ElemDeclName

ElemDeclName ::= name

 o elementdecl

elementdecl ::= '<' '!ELEMENT' S ElemDeclName S contentspec S? '>'

 o EmptyElemTag

EmptyElemTag ::= '<' STagName (S Attribute)* S? '/' '>'

 o EntityDecl

EntityDecl ::= '<' '!' ENTITY' S EntityDeclName S EntityDef S? '>'

| '<' '!' ENTITY' S '%' S EntityDeclName S PEDef S? '>'

EntityDef ::= EntityValue | (ExternalID NDataDecl?)

PEDef ::= EntityValue | ExternalID

 o EntityDeclName

EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'

| "'" ([^%&'] | PEReference | Reference)* "'"

 o EntityValue

EntityDeclName ::= Name

 o ETag

ETag ::= '<' '/' ETagName S? '>'

 o ETagName

ETagName ::= Name

 o ExternalID

ExternalID ::= 'SYSTEM' S SystemLiteral

| 'PUBLIC' S PubidLiteral S SystemLiteral

 o NotationDecl

NotationDecl ::= '<' '!NOTATION' S Name S (ExternalID | PublicID) S? '>'

 o PI

PI ::= '<' '?' PITarget (S (Char* - (Char* '?>' Char*)))? '?' '>'

 o PITarget

PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

 o Reference

Reference ::= EntityRef | CharRef | PEReference

EntityRef ::= '&' Name ';'

PEReference ::= '%' Name ';'

CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';

 o STag

STag ::= '<' STagName (S Attribute)* S? '>'

 o STagName

STagName ::= Name

 o TextDecl

TextDecl ::= '<' '?' 'xml' VersionInfo? EncodingDecl S? '?>'

 o XMLDecl

XMLDecl ::= '<' '?' 'xml' VersionInfo EncodingDecl? SDDecl? S? '?' '>'

Method Index

 o token(int, String)
The interface call-back method.

Variables

 o STag
 public static final int STag

STag ::= '<' STagName (S Attribute)* S? '>'

 o EmptyElemTag
 public static final int EmptyElemTag

EmptyElemTag ::= '<' STagName (S Attribute)* S? '/' '>'

 o STagName
 public static final int STagName

STagName ::= Name

 o AttValue
 public static final int AttValue

AttValue ::= '"' ([^<&"] | Reference)* '"'

| "'" ([^<&'] | Reference)* "'"

 o AttName
 public static final int AttName

AttName ::= Name

 o Attribute
 public static final int Attribute

Attribute ::= AttName Eq AttValue

 o ETag
 public static final int ETag

ETag ::= '<' '/' ETagName S? '>'

 o ETagName
 public static final int ETagName

ETagName ::= Name

 o CharData
 public static final int CharData

CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

 o Comment
 public static final int Comment

Comment ::= '<' '!' '--' ((Char - '-') | ('-' (Char - '-')))* '-->'

 o Reference
 public static final int Reference

Reference ::= EntityRef | CharRef | PEReference

EntityRef ::= '&' Name ';'

PEReference ::= '%' Name ';'

CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';

 o CDSect
 public static final int CDSect

CDSect ::= CDStart CData CDEnd

CDStart ::= '<' '!' '[CDATA['

CData ::= (Char* - (Char* ']]>' Char*))

CDEnd ::= ']]>'

 o PI
 public static final int PI

PI ::= '<' '?' PITarget (S (Char* - (Char* '?>' Char*)))? '?' '>'

 o PITarget
 public static final int PITarget

PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

 o XMLDecl
 public static final int XMLDecl

XMLDecl ::= '<' '?' 'xml' VersionInfo EncodingDecl? SDDecl? S? '?' '>'

 o TextDecl
 public static final int TextDecl

TextDecl ::= '<' '?' 'xml' VersionInfo? EncodingDecl S? '?>'

 o DTDName
 public static final int DTDName

DTDName ::= name

 o AttListDecl
 public static final int AttListDecl

AttListDecl ::= '<' '!' 'ATTLIST' S Name AttDef* S? '>'

 o elementdecl
 public static final int elementdecl

elementdecl ::= '<' '!ELEMENT' S ElemDeclName S contentspec S? '>'

 o ElemDeclName
 public static final int ElemDeclName

ElemDeclName ::= name

 o EntityDecl
 public static final int EntityDecl

EntityDecl ::= '<' '!' ENTITY' S EntityDeclName S EntityDef S? '>'

| '<' '!' ENTITY' S '%' S EntityDeclName S PEDef S? '>'

EntityDef ::= EntityValue | (ExternalID NDataDecl?)

PEDef ::= EntityValue | ExternalID

 o EntityValue
 public static final int EntityValue

EntityDeclName ::= Name

 o EntityDeclName
 public static final int EntityDeclName

EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'

| "'" ([^%&'] | PEReference | Reference)* "'"

 o NotationDecl
 public static final int NotationDecl

NotationDecl ::= '<' '!NOTATION' S Name S (ExternalID | PublicID) S? '>'

 o ExternalID
 public static final int ExternalID

ExternalID ::= 'SYSTEM' S SystemLiteral

| 'PUBLIC' S PubidLiteral S SystemLiteral

Methods

 o token
 public abstract void token(int token,
                            String value)
The interface call-back method. Receives an XML token and it's corresponding value

Parameters:
token - The XML token constant as specified in the interface.
value - The corresponding substring from the parsed text.

All Packages  Class Hierarchy  This Package  Previous  Next  Index