Java Doc for XMLValidator.java in  » Web-Server » Rimfaxe-Web-Server » org » apache » xerces » validators » common » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Server » Rimfaxe Web Server » org.apache.xerces.validators.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.validators.common.XMLValidator

XMLValidator
final public class XMLValidator implements DefaultEntityHandler.EventHandler,XMLEntityHandler.CharDataHandler,XMLDocumentScanner.EventHandler,NamespacesScope.NamespacesHandler,FieldActivator(Code)
This class is the super all-in-one validator used by the parser.
version:
   $Id: XMLValidator.java,v 1.186.2.8 2001/11/07 20:08:48 neilg Exp $

Inner Class :static class Resolver implements EntityResolver
Inner Class :static class ErrorHandler implements org.xml.sax.ErrorHandler
Inner Class :public interface AttributeValidator
Inner Class :final class AttValidatorNOTATION implements AttributeValidator
Inner Class :final class AttValidatorENUMERATION implements AttributeValidator
Inner Class :protected static class XPathMatcherStack
Inner Class :abstract protected class ValueStoreBase implements ValueStore
Inner Class :protected class UniqueValueStore extends ValueStoreBase
Inner Class :protected class KeyValueStore extends ValueStoreBase
Inner Class :protected class KeyRefValueStore extends ValueStoreBase
Inner Class :protected class ValueStoreCache
Inner Class :final static class OrderedHashtable implements Cloneable

Field Summary
final protected static  booleanDEBUG_IDENTITY_CONSTRAINTS
     Compile to true to debug identity constraints.
final protected static  booleanDEBUG_VALUE_STORES
     Compile to true to debug value stores.
protected  HashtableUPACheckedGrammarURIs
    
 booleanfInElementContent
    
protected  XPathMatcherStackfMatcherStack
     Stack of active XPath matchers for identity constraints.
protected  SubstitutionGroupComparatorfSGComparator
    
 intfStandaloneReader
    
 StringPoolfStringPool
    
 booleanfValidating
    
protected  ValueStoreCachefValueStoreCache
     Cache of value stores for identity constraint fields.
protected static  ObjectfgNullObject
    

Constructor Summary
public  XMLValidator(StringPool stringPool, XMLErrorReporter errorReporter, DefaultEntityHandler entityHandler, XMLDocumentScanner documentScanner)
     Constructs an XML validator.

Method Summary
public  XPathMatcheractivateField(Field field)
     Request to activate the specified field.
public  booleanattribute(QName element, QName attrName, int attrValue)
     Signal the scanning of an attribute associated to the previous start element tag.
public  voidcallCharacters(int ch)
     Call characters.
public  voidcallComment(int comment)
     Call comment.
public  voidcallEndCDATA()
     Call end CDATA section.
public  voidcallEndDocument()
     Call end document.
public  voidcallEndElement(int readerId)
     Call end element.
public  voidcallProcessingInstruction(int target, int data)
     Call processing instruction.
public  voidcallStandaloneIsYes()
    
public  voidcallStartCDATA()
     Call start CDATA section.
public  voidcallStartDocument()
     Call start document.
public  voidcallStartElement(QName element)
     Call start element.
public  voidcallTextDecl(int version, int encoding)
     Call text declaration.
public  voidcallXMLDecl(int version, int encoding, int standalone)
     Call XML declaration.
public  voidelement(QName element)
     Signal the scanning of an element name in a start element tag.
public  voidendEntityReference(int entityName, int entityType, int entityContext)
     End entity reference.
public  voidendNamespaceDeclScope(int prefix)
     End a namespace declaration scope.
public  voidendValueScopeFor(IdentityConstraint identityConstraint)
     Ends the value scope for the specified identity constraint.
public  booleanexternalEntityStandaloneCheck()
     External entity standalone check.
protected  booleangetAttDefIsExternal(QName element, QName attribute)
     Protected for use by AttributeValidator classes.
public  intgetContentSpecHandle(int elementIndex)
     Returns the content spec handle for an element index.
public  intgetContentSpecType(int elementIndex)
     Returns the content spec type for an element index.
public  booleangetDynamicValidationEnabled()
     Returns true if validation is dynamic.
public  StringgetExternalNoNamespaceSchema()
    
public  StringgetExternalSchemas()
    
public  booleangetLoadDTDGrammar()
    
public  booleangetNamespacesEnabled()
     Returns true if namespaces are enabled.
public  booleangetNormalizeConents()
    
public  booleangetSchemaFullCheckingEnabled()
     Returns true if full Schema checking is on.
public  booleangetSchemaValidationEnabled()
     Returns true if Schema support is on.
public  booleangetValidating()
     Return true if validating.
public  booleangetValidationEnabled()
     Returns true if validation is enabled.
public  booleangetWarningOnDuplicateAttDef()
     Returns true if duplicate attribute definitions signal a warning.
public  booleangetWarningOnUndeclaredElements()
     Returns true if undeclared elements signal a warning.
public  voidinitHandlers(boolean sendCharDataAsCharArray, XMLDocumentHandler docHandler, XMLDocumentHandler.DTDHandler dtdHandler)
     Set char data processing preference and handlers.
 booleaninvalidStandaloneAttDef(QName element, QName attribute)
     Returns true if invalid standalone attribute definition.
public  voidprocessCharacters(char[] chars, int offset, int length)
     Process characters.
public  voidprocessCharacters(int data)
     Process characters.
public  voidprocessWhitespace(char[] chars, int offset, int length)
     Process whitespace.
public  voidprocessWhitespace(int data)
     Process whitespace.
protected  voidreportRecoverableXMLError(int majorCode, int minorCode)
     Report a recoverable xml error.
protected  voidreportRecoverableXMLError(int majorCode, int minorCode, int stringIndex1)
     Report a recoverable xml error.
protected  voidreportRecoverableXMLError(int majorCode, int minorCode, String string1)
     Report a recoverable xml error.
protected  voidreportRecoverableXMLError(int majorCode, int minorCode, int stringIndex1, int stringIndex2)
     Report a recoverable xml error.
protected  voidreportRecoverableXMLError(int majorCode, int minorCode, String string1, String string2)
     Report a recoverable xml error.
protected  voidreportRecoverableXMLError(int majorCode, int minorCode, String string1, String string2, String string3)
     Report a recoverable xml error.
public  voidreset(StringPool stringPool)
     Reset.
public  voidresetOrCopy(StringPool stringPool)
     Reset or copy.
public  voidscanAttributeName(XMLEntityHandler.EntityReader entityReader, QName element, QName attribute)
     Scans attribute name.
public  voidscanElementType(XMLEntityHandler.EntityReader entityReader, char fastchar, QName element)
     Scans element type.
public  booleanscanExpectedElementType(XMLEntityHandler.EntityReader entityReader, char fastchar, QName element)
     Scans expected element type.
public  voidsendEndOfInputNotifications(int entityName, boolean moreToFollow)
     Send end of input notification.
public  voidsendReaderChangeNotifications(XMLEntityHandler.EntityReader reader, int readerId)
     Send reader change notifications.
public  voidsetDynamicValidationEnabled(boolean flag)
     Sets whether validation is dynamic.
public  voidsetExternalNoNamespaceSchema(Object value)
    
public  voidsetExternalSchemas(Object value)
    
public  voidsetGrammarResolver(GrammarResolver grammarResolver)
    
public  voidsetLoadDTDGrammar(boolean loadDG)
    
public  voidsetNamespacesEnabled(boolean flag)
     Sets whether namespaces are enabled.
public  voidsetNormalizeAttributeValues(boolean normalize)
    
public  voidsetNormalizeContents(boolean normalize)
    
public  voidsetRootElementType(QName rootElement)
     Sets the root element.
public  voidsetSchemaFullCheckingEnabled(boolean flag)
    
public  voidsetSchemaValidationEnabled(boolean flag)
     Sets whether Schema support is on/off.
public  voidsetValidationEnabled(boolean flag)
     Turning on validation/dynamic turns on validation if it is off, and this is remembered.
public  voidsetWarningOnDuplicateAttDef(boolean flag)
     Sets whether duplicate attribute definitions signal a warning.
public  voidsetWarningOnUndeclaredElements(boolean flag)
     Sets whether undeclared elements signal a warning.
public  voidstartEntityReference(int entityName, int entityType, int entityContext)
     Start entity reference.
public  voidstartNamespaceDeclScope(int prefix, int uri)
     Start a new namespace declaration scope.
public  voidstartValueScopeFor(IdentityConstraint identityConstraint)
     Start the value scope for the specified identity constraint.
 voidvalidateUsingDV(DatatypeValidator dv, String content, boolean onlyVal3Types)
    
protected  intwhatCanGoHere(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.

Note that the incoming content model to test must be valid at least up to the insertion point.


Field Detail
DEBUG_IDENTITY_CONSTRAINTS
final protected static boolean DEBUG_IDENTITY_CONSTRAINTS(Code)
Compile to true to debug identity constraints.



DEBUG_VALUE_STORES
final protected static boolean DEBUG_VALUE_STORES(Code)
Compile to true to debug value stores.



UPACheckedGrammarURIs
protected Hashtable UPACheckedGrammarURIs(Code)



fInElementContent
boolean fInElementContent(Code)



fMatcherStack
protected XPathMatcherStack fMatcherStack(Code)
Stack of active XPath matchers for identity constraints. All active XPath matchers are notified of startElement, characters and endElement callbacks in order to perform their matches.

For each element with identity constraints, the selector of each identity constraint is activated. When the selector matches its XPath, then all the fields of the identity constraint are activated.

Note: Once the activation scope is left, the XPath matchers are automatically removed from the stack of active matchers and no longer receive callbacks.




fSGComparator
protected SubstitutionGroupComparator fSGComparator(Code)



fStandaloneReader
int fStandaloneReader(Code)



fStringPool
StringPool fStringPool(Code)



fValidating
boolean fValidating(Code)



fValueStoreCache
protected ValueStoreCache fValueStoreCache(Code)
Cache of value stores for identity constraint fields.



fgNullObject
protected static Object fgNullObject(Code)




Constructor Detail
XMLValidator
public XMLValidator(StringPool stringPool, XMLErrorReporter errorReporter, DefaultEntityHandler entityHandler, XMLDocumentScanner documentScanner)(Code)
Constructs an XML validator.




Method Detail
activateField
public XPathMatcher activateField(Field field) throws Exception(Code)
Request to activate the specified field. This method returns the matcher for the field.
Parameters:
  field - The field to activate.



attribute
public boolean attribute(QName element, QName attrName, int attrValue) throws Exception(Code)
Signal the scanning of an attribute associated to the previous start element tag.
Parameters:
  element - Element name scanned.
Parameters:
  attrName - Attribute name scanned.
Parameters:
  attrValue - The string pool index of the attribute value.



callCharacters
public void callCharacters(int ch) throws Exception(Code)
Call characters.



callComment
public void callComment(int comment) throws Exception(Code)
Call comment.



callEndCDATA
public void callEndCDATA() throws Exception(Code)
Call end CDATA section.



callEndDocument
public void callEndDocument() throws Exception(Code)
Call end document.



callEndElement
public void callEndElement(int readerId) throws Exception(Code)
Call end element.



callProcessingInstruction
public void callProcessingInstruction(int target, int data) throws Exception(Code)
Call processing instruction.



callStandaloneIsYes
public void callStandaloneIsYes() throws Exception(Code)



callStartCDATA
public void callStartCDATA() throws Exception(Code)
Call start CDATA section.



callStartDocument
public void callStartDocument() throws Exception(Code)
Call start document.



callStartElement
public void callStartElement(QName element) throws Exception(Code)
Call start element.



callTextDecl
public void callTextDecl(int version, int encoding) throws Exception(Code)
Call text declaration.



callXMLDecl
public void callXMLDecl(int version, int encoding, int standalone) throws Exception(Code)
Call XML declaration.



element
public void element(QName element) throws Exception(Code)
Signal the scanning of an element name in a start element tag.
Parameters:
  element - Element name scanned.



endEntityReference
public void endEntityReference(int entityName, int entityType, int entityContext) throws Exception(Code)
End entity reference.



endNamespaceDeclScope
public void endNamespaceDeclScope(int prefix) throws Exception(Code)
End a namespace declaration scope.



endValueScopeFor
public void endValueScopeFor(IdentityConstraint identityConstraint) throws Exception(Code)
Ends the value scope for the specified identity constraint.
Parameters:
  identityConstraint - The identity constraint.



externalEntityStandaloneCheck
public boolean externalEntityStandaloneCheck()(Code)
External entity standalone check.



getAttDefIsExternal
protected boolean getAttDefIsExternal(QName element, QName attribute)(Code)
Protected for use by AttributeValidator classes.



getContentSpecHandle
public int getContentSpecHandle(int elementIndex)(Code)
Returns the content spec handle for an element index.



getContentSpecType
public int getContentSpecType(int elementIndex)(Code)
Returns the content spec type for an element index.



getDynamicValidationEnabled
public boolean getDynamicValidationEnabled()(Code)
Returns true if validation is dynamic.



getExternalNoNamespaceSchema
public String getExternalNoNamespaceSchema()(Code)



getExternalSchemas
public String getExternalSchemas()(Code)



getLoadDTDGrammar
public boolean getLoadDTDGrammar()(Code)
Returns fLoadDTDGrammar *



getNamespacesEnabled
public boolean getNamespacesEnabled()(Code)
Returns true if namespaces are enabled.



getNormalizeConents
public boolean getNormalizeConents()(Code)



getSchemaFullCheckingEnabled
public boolean getSchemaFullCheckingEnabled()(Code)
Returns true if full Schema checking is on.



getSchemaValidationEnabled
public boolean getSchemaValidationEnabled()(Code)
Returns true if Schema support is on.



getValidating
public boolean getValidating()(Code)
Return true if validating.



getValidationEnabled
public boolean getValidationEnabled()(Code)
Returns true if validation is enabled.



getWarningOnDuplicateAttDef
public boolean getWarningOnDuplicateAttDef()(Code)
Returns true if duplicate attribute definitions signal a warning.



getWarningOnUndeclaredElements
public boolean getWarningOnUndeclaredElements()(Code)
Returns true if undeclared elements signal a warning.



initHandlers
public void initHandlers(boolean sendCharDataAsCharArray, XMLDocumentHandler docHandler, XMLDocumentHandler.DTDHandler dtdHandler)(Code)
Set char data processing preference and handlers.



invalidStandaloneAttDef
boolean invalidStandaloneAttDef(QName element, QName attribute)(Code)
Returns true if invalid standalone attribute definition.



processCharacters
public void processCharacters(char[] chars, int offset, int length) throws Exception(Code)
Process characters. Schema Normalization



processCharacters
public void processCharacters(int data) throws Exception(Code)
Process characters.



processWhitespace
public void processWhitespace(char[] chars, int offset, int length) throws Exception(Code)
Process whitespace.



processWhitespace
public void processWhitespace(int data) throws Exception(Code)
Process whitespace.



reportRecoverableXMLError
protected void reportRecoverableXMLError(int majorCode, int minorCode) throws Exception(Code)
Report a recoverable xml error.



reportRecoverableXMLError
protected void reportRecoverableXMLError(int majorCode, int minorCode, int stringIndex1) throws Exception(Code)
Report a recoverable xml error.



reportRecoverableXMLError
protected void reportRecoverableXMLError(int majorCode, int minorCode, String string1) throws Exception(Code)
Report a recoverable xml error.



reportRecoverableXMLError
protected void reportRecoverableXMLError(int majorCode, int minorCode, int stringIndex1, int stringIndex2) throws Exception(Code)
Report a recoverable xml error.



reportRecoverableXMLError
protected void reportRecoverableXMLError(int majorCode, int minorCode, String string1, String string2) throws Exception(Code)
Report a recoverable xml error.



reportRecoverableXMLError
protected void reportRecoverableXMLError(int majorCode, int minorCode, String string1, String string2, String string3) throws Exception(Code)
Report a recoverable xml error.



reset
public void reset(StringPool stringPool) throws Exception(Code)
Reset.



resetOrCopy
public void resetOrCopy(StringPool stringPool) throws Exception(Code)
Reset or copy.



scanAttributeName
public void scanAttributeName(XMLEntityHandler.EntityReader entityReader, QName element, QName attribute) throws Exception(Code)
Scans attribute name.



scanElementType
public void scanElementType(XMLEntityHandler.EntityReader entityReader, char fastchar, QName element) throws Exception(Code)
Scans element type.



scanExpectedElementType
public boolean scanExpectedElementType(XMLEntityHandler.EntityReader entityReader, char fastchar, QName element) throws Exception(Code)
Scans expected element type.



sendEndOfInputNotifications
public void sendEndOfInputNotifications(int entityName, boolean moreToFollow) throws Exception(Code)
Send end of input notification.



sendReaderChangeNotifications
public void sendReaderChangeNotifications(XMLEntityHandler.EntityReader reader, int readerId) throws Exception(Code)
Send reader change notifications.



setDynamicValidationEnabled
public void setDynamicValidationEnabled(boolean flag) throws Exception(Code)
Sets whether validation is dynamic.



setExternalNoNamespaceSchema
public void setExternalNoNamespaceSchema(Object value)(Code)



setExternalSchemas
public void setExternalSchemas(Object value)(Code)



setGrammarResolver
public void setGrammarResolver(GrammarResolver grammarResolver)(Code)



setLoadDTDGrammar
public void setLoadDTDGrammar(boolean loadDG)(Code)
Sets fLoadDTDGrammar when validation is off *



setNamespacesEnabled
public void setNamespacesEnabled(boolean flag)(Code)
Sets whether namespaces are enabled.



setNormalizeAttributeValues
public void setNormalizeAttributeValues(boolean normalize)(Code)
Sets fNormalizeAttributeValues *



setNormalizeContents
public void setNormalizeContents(boolean normalize)(Code)
Sets fNormalizeContents *



setRootElementType
public void setRootElementType(QName rootElement)(Code)
Sets the root element.



setSchemaFullCheckingEnabled
public void setSchemaFullCheckingEnabled(boolean flag)(Code)
Sets whether full Schema error checking is on/off



setSchemaValidationEnabled
public void setSchemaValidationEnabled(boolean flag)(Code)
Sets whether Schema support is on/off.



setValidationEnabled
public void setValidationEnabled(boolean flag) throws Exception(Code)
Turning on validation/dynamic turns on validation if it is off, and this is remembered. Turning off validation DISABLES validation/dynamic if it is on. Turning off validation/dynamic DOES NOT turn off validation if it was explicitly turned on, only if it was turned on BECAUSE OF the call to turn validation/dynamic on. Turning on validation will REENABLE and turn validation/dynamic back on if it was disabled by a call that turned off validation while validation/dynamic was enabled.



setWarningOnDuplicateAttDef
public void setWarningOnDuplicateAttDef(boolean flag)(Code)
Sets whether duplicate attribute definitions signal a warning.



setWarningOnUndeclaredElements
public void setWarningOnUndeclaredElements(boolean flag)(Code)
Sets whether undeclared elements signal a warning.



startEntityReference
public void startEntityReference(int entityName, int entityType, int entityContext) throws Exception(Code)
Start entity reference.



startNamespaceDeclScope
public void startNamespaceDeclScope(int prefix, int uri) throws Exception(Code)
Start a new namespace declaration scope.



startValueScopeFor
public void startValueScopeFor(IdentityConstraint identityConstraint) throws Exception(Code)
Start the value scope for the specified identity constraint. This method is called when the selector matches in order to initialize the value store.
Parameters:
  identityConstraint - The identity constraint.



validateUsingDV
void validateUsingDV(DatatypeValidator dv, String content, boolean onlyVal3Types) throws Exception, InvalidDatatypeValueException(Code)



whatCanGoHere
protected int whatCanGoHere(int elementIndex, boolean fullyValid, InsertableElementsInfo info) throws Exception(Code)
Returns information about which elements can be placed at a particular point in the passed element's content model.

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.
Parameters:
  elementIndex - The index within the ElementDeclPool of theelement which is being querying.
Parameters:
  fullyValid - Only return elements that can be inserted and stillmaintain the validity of subsequent elements past theinsertion point (if any). If the insertion point is atthe end, and this is true, then only elements that canbe legal final states will be returned.
Parameters:
  info - An object that contains the required input data for the method,and which will contain the output information if successful. The value -1 if fully valid, else the 0 based index of the childthat first failed before the insertion point. If the valuereturned is equal to the number of children, then the specifiedchildren are valid but additional content is required to reach avalid ending state.
exception:
  Exception - Thrown on error.
See Also:   InsertableElementsInfo




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.