|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xerces.validators.common.XMLValidator
This class is the super all-in-one validator used by the parser.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Inner Class Summary | |
static interface |
XMLValidator.AttributeValidator
AttributeValidator. |
Constructor Summary | |
XMLValidator(StringPool stringPool,
XMLErrorReporter errorReporter,
DefaultEntityHandler entityHandler,
XMLDocumentScanner documentScanner)
Constructs an XML validator. |
Method Summary | |
boolean |
attribute(QName element,
QName attrName,
int attrValue)
Signal the scanning of an attribute associated to the previous start element tag. |
void |
callCharacters(int ch)
Call characters. |
void |
callComment(int comment)
Call comment. |
void |
callEndCDATA()
Call end CDATA section. |
void |
callEndDocument()
Call end document. |
void |
callEndElement(int readerId)
Call end element. |
void |
callProcessingInstruction(int target,
int data)
Call processing instruction. |
void |
callStandaloneIsYes()
|
void |
callStartCDATA()
Call start CDATA section. |
void |
callStartDocument()
Call start document. |
void |
callStartElement(QName element)
Call start element. |
void |
callTextDecl(int version,
int encoding)
Call text declaration. |
void |
callXMLDecl(int version,
int encoding,
int standalone)
Call XML declaration. |
int |
checkLastChild(int elementIndex,
int childrenLength)
|
void |
element(QName element)
Signal the scanning of an element name in a start element tag. |
void |
endEntityReference(int entityName,
int entityType,
int entityContext)
End entity reference. |
void |
endNamespaceDeclScope(int prefix)
End a namespace declaration scope. |
boolean |
externalEntityStandaloneCheck()
External entity standalone check. |
protected boolean |
getAttDefIsExternal(QName element,
QName attribute)
Protected for use by AttributeValidator classes. |
int |
getContentSpecHandle(int elementIndex)
Returns the content spec handle for an element index. |
int |
getContentSpecType(int elementIndex)
Returns the content spec type for an element index. |
boolean |
getDynamicValidationEnabled()
Returns true if validation is dynamic. |
boolean |
getLoadDTDGrammar()
Returns fLoadDTDGrammar |
boolean |
getNamespacesEnabled()
Returns true if namespaces are enabled. |
boolean |
getSchemaValidationEnabled()
Returns true if Schema support is on. |
boolean |
getUpFrontValidationEnabled()
Returns true if up front validation is on. |
boolean |
getValidating()
Return true if validating. |
boolean |
getValidationEnabled()
Returns true if validation is enabled. |
boolean |
getWarningOnDuplicateAttDef()
Returns true if duplicate attribute definitions signal a warning. |
boolean |
getWarningOnUndeclaredElements()
Returns true if undeclared elements signal a warning. |
void |
initHandlers(boolean sendCharDataAsCharArray,
XMLDocumentHandler docHandler,
XMLDocumentHandler.DTDHandler dtdHandler)
Set char data processing preference and handlers. |
void |
processCharacters(char[] chars,
int offset,
int length)
Process characters. |
void |
processCharacters(int data)
Process characters. |
void |
processWhitespace(char[] chars,
int offset,
int length)
Process whitespace. |
void |
processWhitespace(int data)
Process whitespace. |
protected void |
reportRecoverableXMLError(int majorCode,
int minorCode)
Report a recoverable xml error. |
protected void |
reportRecoverableXMLError(int majorCode,
int minorCode,
int stringIndex1)
Report a recoverable xml error. |
protected void |
reportRecoverableXMLError(int majorCode,
int minorCode,
int stringIndex1,
int stringIndex2)
Report a recoverable xml error. |
protected void |
reportRecoverableXMLError(int majorCode,
int minorCode,
java.lang.String string1)
Report a recoverable xml error. |
protected void |
reportRecoverableXMLError(int majorCode,
int minorCode,
java.lang.String string1,
java.lang.String string2)
Report a recoverable xml error. |
protected void |
reportRecoverableXMLError(int majorCode,
int minorCode,
java.lang.String string1,
java.lang.String string2,
java.lang.String string3)
Report a recoverable xml error. |
void |
reset(StringPool stringPool)
Reset. |
void |
resetOrCopy(StringPool stringPool)
Reset or copy. |
void |
scanAttributeName(XMLEntityHandler.EntityReader entityReader,
QName element,
QName attribute)
Scans attribute name. |
void |
scanElementType(XMLEntityHandler.EntityReader entityReader,
char fastchar,
QName element)
Scans element type. |
boolean |
scanExpectedElementType(XMLEntityHandler.EntityReader entityReader,
char fastchar,
QName element)
Scans expected element type. |
void |
sendEndOfInputNotifications(int entityName,
boolean moreToFollow)
Send end of input notification. |
void |
sendReaderChangeNotifications(XMLEntityHandler.EntityReader reader,
int readerId)
Send reader change notifications. |
void |
setDynamicValidationEnabled(boolean flag)
Sets whether validation is dynamic. |
void |
setGrammarResolver(GrammarResolver grammarResolver)
|
void |
setLoadDTDGrammar(boolean loadDG)
Sets fLoadDTDGrammar when validation is off |
void |
setNamespacesEnabled(boolean flag)
Sets whether namespaces are enabled. |
void |
setRootElementType(QName rootElement)
Sets the root element. |
void |
setSchemaValidationEnabled(boolean flag)
Sets whether Schema support is on/off. |
void |
setUpFrontValidationEnabled(boolean flag)
Sets up front validation (validation must be turned on). |
void |
setValidationEnabled(boolean flag)
Turning on validation/dynamic turns on validation if it is off, and this is remembered. |
void |
setWarningOnDuplicateAttDef(boolean flag)
Sets whether duplicate attribute definitions signal a warning. |
void |
setWarningOnUndeclaredElements(boolean flag)
Sets whether undeclared elements signal a warning. |
void |
startEntityReference(int entityName,
int entityType,
int entityContext)
Start entity reference. |
void |
startNamespaceDeclScope(int prefix,
int uri)
Start a new namespace declaration scope. |
protected int |
whatCanGoHere(int elementIndex,
boolean fullyValid,
InsertableElementsInfo info)
Returns information about which elements can be placed at a particular point in the passed element's content model. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public XMLValidator(StringPool stringPool, XMLErrorReporter errorReporter, DefaultEntityHandler entityHandler, XMLDocumentScanner documentScanner)
Method Detail |
public void setGrammarResolver(GrammarResolver grammarResolver)
public void initHandlers(boolean sendCharDataAsCharArray, XMLDocumentHandler docHandler, XMLDocumentHandler.DTDHandler dtdHandler)
public void resetOrCopy(StringPool stringPool) throws java.lang.Exception
public void reset(StringPool stringPool) throws java.lang.Exception
public void setValidationEnabled(boolean flag) throws java.lang.Exception
public boolean getValidationEnabled()
public void setSchemaValidationEnabled(boolean flag)
public boolean getSchemaValidationEnabled()
public void setDynamicValidationEnabled(boolean flag) throws java.lang.Exception
public boolean getDynamicValidationEnabled()
public void setLoadDTDGrammar(boolean loadDG)
public boolean getLoadDTDGrammar()
public void setNamespacesEnabled(boolean flag)
public boolean getNamespacesEnabled()
public void setWarningOnDuplicateAttDef(boolean flag)
public boolean getWarningOnDuplicateAttDef()
public void setWarningOnUndeclaredElements(boolean flag)
public boolean getWarningOnUndeclaredElements()
public void setUpFrontValidationEnabled(boolean flag)
public boolean getUpFrontValidationEnabled()
public void startEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
public void endEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
public void sendEndOfInputNotifications(int entityName, boolean moreToFollow) throws java.lang.Exception
public void sendReaderChangeNotifications(XMLEntityHandler.EntityReader reader, int readerId) throws java.lang.Exception
public boolean externalEntityStandaloneCheck()
public boolean getValidating()
public void processCharacters(char[] chars, int offset, int length) throws java.lang.Exception
public void processCharacters(int data) throws java.lang.Exception
public void processWhitespace(char[] chars, int offset, int length) throws java.lang.Exception
public void processWhitespace(int data) throws java.lang.Exception
public void scanElementType(XMLEntityHandler.EntityReader entityReader, char fastchar, QName element) throws java.lang.Exception
public boolean scanExpectedElementType(XMLEntityHandler.EntityReader entityReader, char fastchar, QName element) throws java.lang.Exception
public void scanAttributeName(XMLEntityHandler.EntityReader entityReader, QName element, QName attribute) throws java.lang.Exception
public void callStartDocument() throws java.lang.Exception
public void callEndDocument() throws java.lang.Exception
public void callXMLDecl(int version, int encoding, int standalone) throws java.lang.Exception
public void callStandaloneIsYes() throws java.lang.Exception
public void callTextDecl(int version, int encoding) throws java.lang.Exception
public void element(QName element) throws java.lang.Exception
element
- Element name scanned.public boolean attribute(QName element, QName attrName, int attrValue) throws java.lang.Exception
element
- Element name scanned.attrName
- Attribute name scanned.attrValue
- The string pool index of the attribute value.public void callStartElement(QName element) throws java.lang.Exception
public void callEndElement(int readerId) throws java.lang.Exception
public int checkLastChild(int elementIndex, int childrenLength) throws java.lang.Exception
public void callStartCDATA() throws java.lang.Exception
public void callEndCDATA() throws java.lang.Exception
public void callCharacters(int ch) throws java.lang.Exception
public void callProcessingInstruction(int target, int data) throws java.lang.Exception
public void callComment(int comment) throws java.lang.Exception
public void startNamespaceDeclScope(int prefix, int uri) throws java.lang.Exception
public void endNamespaceDeclScope(int prefix) throws java.lang.Exception
public void setRootElementType(QName rootElement)
public int getContentSpecType(int elementIndex)
public int getContentSpecHandle(int elementIndex)
protected void reportRecoverableXMLError(int majorCode, int minorCode) throws java.lang.Exception
protected void reportRecoverableXMLError(int majorCode, int minorCode, int stringIndex1) throws java.lang.Exception
protected void reportRecoverableXMLError(int majorCode, int minorCode, java.lang.String string1) throws java.lang.Exception
protected void reportRecoverableXMLError(int majorCode, int minorCode, int stringIndex1, int stringIndex2) throws java.lang.Exception
protected void reportRecoverableXMLError(int majorCode, int minorCode, java.lang.String string1, java.lang.String string2) throws java.lang.Exception
protected void reportRecoverableXMLError(int majorCode, int minorCode, java.lang.String string1, java.lang.String string2, java.lang.String string3) throws java.lang.Exception
protected int whatCanGoHere(int elementIndex, boolean fullyValid, InsertableElementsInfo info) throws java.lang.Exception
Note that the incoming content model to test must be valid at least up to the insertion point. If not, then -1 will be returned and the info object will not have been filled in.
If, on return, the info.isValidEOC flag is set, then the 'insert after' elemement is a valid end of content, i.e. nothing needs to be inserted after it to make the parent element's content model valid.
elementIndex
- The index within the ElementDeclPool
of the
element which is being querying.fullyValid
- Only return elements that can be inserted and still
maintain the validity of subsequent elements past the
insertion point (if any). If the insertion point is at
the end, and this is true, then only elements that can
be legal final states will be returned.info
- An object that contains the required input data for the method,
and which will contain the output information if successful.InsertableElementsInfo
protected boolean getAttDefIsExternal(QName element, QName attribute)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |