|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface must be implemented by the users of the XMLDTDScanner class. These methods form the abstraction between the implementation semantics and the more generic task of scanning the DTD-specific XML grammar.
Method Summary | |
int |
addAttDef(int elementIndex,
int attName,
int attType,
int enumeration,
int attDefaultType,
int attDefaultValue)
Add an attribute definition |
int |
addContentSpecNode(int nodeType,
int nodeValue)
Create an XMLContentSpecNode for a single non-leaf |
int |
addContentSpecNode(int nodeType,
int leftNodeIndex,
int rightNodeIndex)
Create an XMLContentSpecNode for a two child leaf |
int |
addElementDecl(int elementType)
Add an element declaration (forward reference) |
int |
addElementDecl(int elementType,
int contentSpecType,
int contentSpec)
Add an element declaration |
int |
addExternalEntityDecl(int name,
int publicId,
int systemId)
Add a declaration for an entity |
int |
addExternalPEDecl(int name,
int publicId,
int systemId)
Add a declaration for an external parameter entity |
int |
addInternalEntityDecl(int name,
int value,
int location)
Add a declaration for an internal entity |
int |
addInternalPEDecl(int name,
int value,
int location)
Add a declaration for an internal parameter entity |
void |
addNameToEnumeration(int enumIndex,
int elementType,
int attrName,
int nameIndex,
boolean isNotationType)
Add a name to an enumeration |
int |
addNotationDecl(int notationName,
int publicId,
int systemId)
Add a declaration for a notation |
int |
addUniqueLeafNode(int nameIndex)
create an XMLContentSpecNode for a leaf |
int |
addUnparsedEntityDecl(int name,
int publicId,
int systemId,
int notationName)
Add a declaration for an unparsed entity |
void |
callComment(int data)
Called when a comment has been scanned |
void |
callProcessingInstruction(int piTarget,
int piData)
Called when a processing instruction has been scanned |
int |
checkForAttributeNameWithPEReference(XMLEntityHandler.EntityReader entityReader,
char fastcheck)
Scan for an attribute name at a point in the grammar where parameter entity references are allowed. |
int |
checkForElementTypeWithPEReference(XMLEntityHandler.EntityReader entityReader,
char fastchar)
Scan for an element type at a point in the grammar where parameter entity references are allowed. |
int |
checkForNameWithPEReference(XMLEntityHandler.EntityReader entityReader,
char fastcheck)
Scan for a Name at a point in the grammar where parameter entity references are allowed. |
int |
checkForNmtokenWithPEReference(XMLEntityHandler.EntityReader entityReader,
char fastcheck)
Scan for a name token at a point in the grammar where parameter entity references are allowed. |
void |
doctypeDecl(int rootElementType,
int publicId,
int systemId)
Called when the doctype decl is scanned |
void |
endEnumeration(int enumIndex)
Finish processing an enumeration |
java.lang.String |
getContentSpecNodeAsString(int nodeIndex)
Create a string representation of an XMLContentSpecNode tree |
void |
internalSubset(int internalSubset)
Supports DOM Level 2 internalSubset additions. |
int |
saveCurrentLocation()
REVISIT - does this really do anything -- can we kill it? |
int |
scanDefaultAttValue(int elementType,
int attrName,
int attType,
int enumeration)
Scan the default value for an attribute |
int |
scanElementType(XMLEntityHandler.EntityReader entityReader,
char fastchar)
Scan an element type |
int |
startEnumeration()
Called when the scanner start scanning an enumeration |
void |
startReadingFromExternalSubset(int publicId,
int systemId)
Called when the DTDScanner starts reading from the external subset |
void |
stopReadingFromExternalSubset()
Called when the DTDScanner stop reading from the external subset |
boolean |
validEncName(java.lang.String encoding)
Determine whether a string is a valid encoding name |
int |
validPublicId(java.lang.String publicId)
Determine if a string is a valid public identifier |
boolean |
validVersionNum(java.lang.String version)
Determine whether a string is a valid XML version number |
Method Detail |
public int saveCurrentLocation() throws java.lang.Exception
public boolean validVersionNum(java.lang.String version) throws java.lang.Exception
version
- string to be checkedpublic boolean validEncName(java.lang.String encoding) throws java.lang.Exception
encoding
- string to be checkedpublic int validPublicId(java.lang.String publicId) throws java.lang.Exception
publicId
- string to be checkedpublic void doctypeDecl(int rootElementType, int publicId, int systemId) throws java.lang.Exception
rootElementType
- handle of the rootElementpublicId
- StringPool handle of the public idsystemId
- StringPool handle of the system idpublic void startReadingFromExternalSubset(int publicId, int systemId) throws java.lang.Exception
publicId
- StringPool handle of the public idsystemId
- StringPool handle of the system idpublic void stopReadingFromExternalSubset() throws java.lang.Exception
public int addElementDecl(int elementType) throws java.lang.Exception
handle
- to the name of the element being declaredpublic int addElementDecl(int elementType, int contentSpecType, int contentSpec) throws java.lang.Exception
handle
- to the name of the element being declaredcontentSpecType
- handle to the type name of the content specContentSpec
- handle to the content spec node for the contentSpecTypepublic int addAttDef(int elementIndex, int attName, int attType, int enumeration, int attDefaultType, int attDefaultValue) throws java.lang.Exception
handle
- to the element whose attribute is being declaredattName
- StringPool handle to the attribute name being declaredattType
- type of the attributeenumeration
- StringPool handle of the attribute's enumeration list (if any)attDefaultType
- an integer value denoting the DefaultDecl valueattDefaultValue
- StringPool handle of this attribute's default valuepublic int addUniqueLeafNode(int nameIndex) throws java.lang.Exception
nameIndex
- StringPool handle to the name (Element) for the nodepublic int addContentSpecNode(int nodeType, int nodeValue) throws java.lang.Exception
nodeType
- the type of XMLContentSpecNode to create - from XMLContentSpecNode.CONTENTSPECNODE_*nodeValue
- handle to an XMLContentSpecNodepublic int addContentSpecNode(int nodeType, int leftNodeIndex, int rightNodeIndex) throws java.lang.Exception
nodeType
- the type of XMLContentSpecNode to create - from XMLContentSpecNode.CONTENTSPECNODE_*leftNodeIndex
- handle to an XMLContentSpecNoderightNodeIndex
- handle to an XMLContentSpecNodepublic java.lang.String getContentSpecNodeAsString(int nodeIndex) throws java.lang.Exception
handle
- to an XMLContentSpecNodepublic int addInternalPEDecl(int name, int value, int location) throws java.lang.Exception
name
- StringPool handle of the parameter entity namevalue
- StringPool handle of the parameter entity valuelocation
- location in the containing entitypublic int addExternalPEDecl(int name, int publicId, int systemId) throws java.lang.Exception
name
- StringPool handle of the parameter entity namepublicId
- StringPool handle of the publicIdsystemId
- StringPool handle of the systemIdpublic int addInternalEntityDecl(int name, int value, int location) throws java.lang.Exception
name
- StringPool handle of the entity namevalue
- StringPool handle of the entity valuelocation
- location in the containing entitypublic int addExternalEntityDecl(int name, int publicId, int systemId) throws java.lang.Exception
name
- StringPool handle of the entity namepublicId
- StringPool handle of the publicIdsystemId
- StringPool handle of the systemIdpublic int addUnparsedEntityDecl(int name, int publicId, int systemId, int notationName) throws java.lang.Exception
name
- StringPool handle of the entity namepublicId
- StringPool handle of the publicIdsystemId
- StringPool handle of the systemIdnotationName
- StringPool handle of the notationNamepublic int startEnumeration() throws java.lang.Exception
public void addNameToEnumeration(int enumIndex, int elementType, int attrName, int nameIndex, boolean isNotationType) throws java.lang.Exception
enumIndex
- StringPool handle to the string list for the enumerationelementType
- handle to the element that owns the attribute with the enumerationattrName
- StringPool handle to the name of the attribut with the enumerationnameIndex
- StringPool handle to the name to be added to the enumerationisNotationType
- true if the enumeration is an enumeration of NOTATION namespublic void endEnumeration(int enumIndex) throws java.lang.Exception
enumIndex
- handle to the string list which holds the enumeration to be finshed.public int addNotationDecl(int notationName, int publicId, int systemId) throws java.lang.Exception
notationName
- publicId
- systemId
- public void callComment(int data) throws java.lang.Exception
data
- StringPool handle of the comment textpublic void callProcessingInstruction(int piTarget, int piData) throws java.lang.Exception
piTarget
- StringPool handle of the PI targetpiData
- StringPool handle of the PI datapublic int scanElementType(XMLEntityHandler.EntityReader entityReader, char fastchar) throws java.lang.Exception
entityReader
- reader to read fromfastchar
- hint - character likely to terminate the element typepublic int checkForElementTypeWithPEReference(XMLEntityHandler.EntityReader entityReader, char fastchar) throws java.lang.Exception
entityReader
- reader to read fromfastchar
- hint - character likely to terminate the element typepublic int checkForAttributeNameWithPEReference(XMLEntityHandler.EntityReader entityReader, char fastcheck) throws java.lang.Exception
entityReader
- reader to read fromfastchar
- hint - character likely to terminate the attribute namepublic int checkForNameWithPEReference(XMLEntityHandler.EntityReader entityReader, char fastcheck) throws java.lang.Exception
entityReader
- reader to read fromfastcheck
- hint - character likely to terminate the namepublic int checkForNmtokenWithPEReference(XMLEntityHandler.EntityReader entityReader, char fastcheck) throws java.lang.Exception
entityReader
- reader to read fromfastcheck
- hint - character likely to terminate the name tokenpublic int scanDefaultAttValue(int elementType, int attrName, int attType, int enumeration) throws java.lang.Exception
elementType
- handle to the element type that owns the attributeattrName
- StringPool handle to the name of the attributeattType
- the attribute typeenumeration
- StringPool handle to a string list containing enumeration valuespublic void internalSubset(int internalSubset)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |