diff --git a/src/internal/XMLScanner.cpp b/src/internal/XMLScanner.cpp index ed95535331ca850b51aeece1f318c770f317e678..4d7e04b5055109c2ae09369adbe4849814a1b824 100644 --- a/src/internal/XMLScanner.cpp +++ b/src/internal/XMLScanner.cpp @@ -169,7 +169,7 @@ XMLScanner::XMLScanner(XMLValidator* const valToAdopt) : , fValidator(valToAdopt) , fValidatorFromUser(false) , fValScheme(Val_Never) - , fSchemaValidation(false) + , fDoSchema(false) , fEmptyNamespaceId(0) , fGlobalNamespaceId(0) , fUnknownNamespaceId(0) @@ -212,7 +212,7 @@ XMLScanner::XMLScanner( XMLDocumentHandler* const docHandler , fValidator(valToAdopt) , fValidatorFromUser(false) , fValScheme(Val_Never) - , fSchemaValidation(false) + , fDoSchema(false) , fEmptyNamespaceId(0) , fGlobalNamespaceId(0) , fUnknownNamespaceId(0) diff --git a/src/internal/XMLScanner.hpp b/src/internal/XMLScanner.hpp index 2a22f3a9ea7f0d8d7f66a2a0bac09dc8aa4fcd42..e8810f4b49a81a37b01fab470e2a3dddeb83a961 100644 --- a/src/internal/XMLScanner.hpp +++ b/src/internal/XMLScanner.hpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.13 2001/03/30 16:46:56 tng + * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense. + * * Revision 1.12 2001/03/30 16:35:06 tng * Schema: Whitespace normalization. * @@ -253,7 +256,7 @@ public : DocTypeHandler* getDocTypeHandler(); bool getDoNamespaces() const; ValSchemes getValidationScheme() const; - bool getSchemaValidation() const; + bool getDoSchema() const; const XMLEntityHandler* getEntityHandler() const; XMLEntityHandler* getEntityHandler(); const XMLErrorReporter* getErrorReporter() const; @@ -358,7 +361,7 @@ public : void setExitOnFirstFatal(const bool newValue); void setValidationScheme(const ValSchemes newScheme); void setValidator(XMLValidator* const valToAdopt); - void setSchemaValidation(const bool doSchema); + void setDoSchema(const bool doSchema); // ----------------------------------------------------------------------- // Deprecated methods as of 3.2.0. Use getValidationScheme() and @@ -669,9 +672,9 @@ private : // This is the currently set validation scheme. It defaults to // 'never', but can be set by the client. // - // fSchemaValidation - // This flag indicates whether the client code wants Schema - // support or not. + // fDoSchema + // This flag indicates whether the client code wants Schema to + // be processed or not. // // fAttName // fAttValue @@ -747,7 +750,7 @@ private : XMLValidator* fValidator; bool fValidatorFromUser; ValSchemes fValScheme; - bool fSchemaValidation; + bool fDoSchema; XMLBuffer fAttNameBuf; XMLBuffer fAttValueBuf; @@ -879,9 +882,9 @@ inline Grammar* XMLScanner::getCurrentGrammar() return fGrammar; } -inline bool XMLScanner::getSchemaValidation() const +inline bool XMLScanner::getDoSchema() const { - return fSchemaValidation; + return fDoSchema; } // --------------------------------------------------------------------------- @@ -980,9 +983,9 @@ inline void XMLScanner::setValidator(XMLValidator* const valToAdopt) fValidator = valToAdopt; } -inline void XMLScanner::setSchemaValidation(const bool doSchema) +inline void XMLScanner::setDoSchema(const bool doSchema) { - fSchemaValidation = doSchema; + fDoSchema = doSchema; } diff --git a/src/internal/XMLScanner2.cpp b/src/internal/XMLScanner2.cpp index 6fffae502112a90e1b3e61dfa1fe013af1e51c25..96e91727956d72298341d3369236aff535e5a3c0 100644 --- a/src/internal/XMLScanner2.cpp +++ b/src/internal/XMLScanner2.cpp @@ -1132,7 +1132,7 @@ void XMLScanner::scanRawAttrListforNameSpaces(const RefVectorOf<KVStringPair>* t } // walk through the list again to deal with "xsi:...." - if (fSchemaValidation && seeXsi) + if (fDoSchema && seeXsi) { for (index = 0; index < attCount; index++) { diff --git a/src/parsers/DOMParser.cpp b/src/parsers/DOMParser.cpp index dcd3b2221bea15bde07c42c0b0c69e2947c5799e..5d3fd33d163e263953a6427393447f3b2d93f99c 100644 --- a/src/parsers/DOMParser.cpp +++ b/src/parsers/DOMParser.cpp @@ -176,9 +176,9 @@ DOMParser::ValSchemes DOMParser::getValidationScheme() const return Val_Auto; } -bool DOMParser::getSchemaValidation() const +bool DOMParser::getDoSchema() const { - return fScanner->getSchemaValidation(); + return fScanner->getDoSchema(); } @@ -231,9 +231,9 @@ void DOMParser::setValidationScheme(const ValSchemes newScheme) fScanner->setValidationScheme(XMLScanner::Val_Auto); } -void DOMParser::setSchemaValidation(const bool newState) +void DOMParser::setDoSchema(const bool newState) { - fScanner->setSchemaValidation(newState); + fScanner->setDoSchema(newState); } diff --git a/src/parsers/DOMParser.hpp b/src/parsers/DOMParser.hpp index 7a40eb1558be2bd70e1f2a988a8481902974f29e..d9bd797815c6a0b6ea9027740f6454513bd0e319 100644 --- a/src/parsers/DOMParser.hpp +++ b/src/parsers/DOMParser.hpp @@ -222,17 +222,17 @@ public : */ ValSchemes getValidationScheme() const; - /** Get the 'schema validation' flag + /** Get the 'do schema' flag * - * This method returns the state of the parser's schema support + * This method returns the state of the parser's schema processing * flag. * * @return true, if the parser is currently configured to - * support schema, false otherwise. + * understand schema, false otherwise. * - * @see #setSchemaValidation + * @see #setDoSchema */ - bool getSchemaValidation() const; + bool getDoSchema() const; /** Get the 'do namespaces' flag * @@ -471,23 +471,20 @@ public : */ void setValidationScheme(const ValSchemes newScheme); - /** Set the 'schema support' flag + /** Set the 'do schema' flag * * This method allows users to enable or disable the parser's - * schema support. + * schema processing. When set to false, parser will not process + * any schema found. * * The parser's default state is: true. * - * This flag is ignored by the underlying scanner if the validation - * is disable. - * * @param newState The value specifying whether schema support should * be enforced or not. * - * @see #getSchemaValidation - * @see #getValidationScheme + * @see #getDoSchema */ - void setSchemaValidation(const bool newState); + void setDoSchema(const bool newState); /** * This method allows users to set the toCreateXMLDeclTypeNode flag diff --git a/src/parsers/SAX2XMLReaderImpl.cpp b/src/parsers/SAX2XMLReaderImpl.cpp index a630d749e2874b88f51dd807174fce070bc75f22..a19e79d303d193debe349897438b6ef54cdcfb54 100644 --- a/src/parsers/SAX2XMLReaderImpl.cpp +++ b/src/parsers/SAX2XMLReaderImpl.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.10 2001/03/30 16:46:57 tng + * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense. + * * Revision 1.9 2001/03/21 21:56:08 tng * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar. * @@ -302,7 +305,7 @@ SAX2XMLReaderImpl::SAX2XMLReaderImpl() : fReuseGrammar = false; // default: schema is on - setSchemaValidation(true); + setDoSchema(true); fPrefixes = new RefStackOf<XMLBuffer> (10, false) ; tempAttrVec = new RefVectorOf<XMLAttr> (10, false) ; @@ -1105,7 +1108,7 @@ void SAX2XMLReaderImpl::setFeature(const XMLCh* const name, const bool value) else if (XMLString::compareIString(name, SAX2XMLReaderImpl::SAX_XERCES_SCHEMA) == 0) { - setSchemaValidation(value); + setDoSchema(value); } else @@ -1127,7 +1130,7 @@ bool SAX2XMLReaderImpl::getFeature(const XMLCh* const name) const else if (XMLString::compareIString(name, SAX2XMLReaderImpl::SAX_XERCES_REUSEGRAMMAR) == 0) return fReuseGrammar; else if (XMLString::compareIString(name, SAX2XMLReaderImpl::SAX_XERCES_SCHEMA) == 0) - return getSchemaValidation(); + return getDoSchema(); else throw SAXNotRecognizedException("Unknown Feature"); return false; @@ -1175,12 +1178,12 @@ bool SAX2XMLReaderImpl::getDoNamespaces() const return fScanner->getDoNamespaces(); } -void SAX2XMLReaderImpl::setSchemaValidation(const bool newState) +void SAX2XMLReaderImpl::setDoSchema(const bool newState) { - fScanner->setSchemaValidation(newState); + fScanner->setDoSchema(newState); } -bool SAX2XMLReaderImpl::getSchemaValidation() const +bool SAX2XMLReaderImpl::getDoSchema() const { - return fScanner->getSchemaValidation(); + return fScanner->getDoSchema(); } diff --git a/src/parsers/SAX2XMLReaderImpl.hpp b/src/parsers/SAX2XMLReaderImpl.hpp index 6b70c73737c3b9eea273cb0fa794183879e35c66..29b2c15278edc74fa51b2d461cb1b61b19b3a237 100644 --- a/src/parsers/SAX2XMLReaderImpl.hpp +++ b/src/parsers/SAX2XMLReaderImpl.hpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.7 2001/03/30 16:46:57 tng + * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense. + * * Revision 1.6 2001/03/21 21:56:08 tng * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar. * @@ -1064,8 +1067,8 @@ private : void setValidationScheme(const ValSchemes newScheme); void setDoNamespaces(const bool newState); bool getDoNamespaces() const; - void setSchemaValidation(const bool newState); - bool getSchemaValidation() const; + void setDoSchema(const bool newState); + bool getDoSchema() const; }; diff --git a/src/parsers/SAXParser.cpp b/src/parsers/SAXParser.cpp index 021577ebdfad64e2f4904840ea01a21a282c6e35..b50f5222839c2b3ed6121b50ec51e95522155967 100644 --- a/src/parsers/SAXParser.cpp +++ b/src/parsers/SAXParser.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.17 2001/03/30 16:46:57 tng + * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense. + * * Revision 1.16 2001/03/21 21:56:08 tng * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar. * @@ -295,9 +298,9 @@ SAXParser::ValSchemes SAXParser::getValidationScheme() const return Val_Auto; } -bool SAXParser::getSchemaValidation() const +bool SAXParser::getDoSchema() const { - return fScanner->getSchemaValidation(); + return fScanner->getDoSchema(); } @@ -326,9 +329,9 @@ void SAXParser::setValidationScheme(const ValSchemes newScheme) fScanner->setValidationScheme(XMLScanner::Val_Auto); } -void SAXParser::setSchemaValidation(const bool newState) +void SAXParser::setDoSchema(const bool newState) { - fScanner->setSchemaValidation(newState); + fScanner->setDoSchema(newState); } diff --git a/src/parsers/SAXParser.hpp b/src/parsers/SAXParser.hpp index 1dcf8c4724689f6d70bc5d13055885a58baafba7..66f7b20fed1c672a07116fb526bbfeee29fbe09f 100644 --- a/src/parsers/SAXParser.hpp +++ b/src/parsers/SAXParser.hpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.13 2001/03/30 16:46:57 tng + * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense. + * * Revision 1.12 2001/03/21 21:56:09 tng * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar. * @@ -248,17 +251,17 @@ public : */ ValSchemes getValidationScheme() const; - /** Get the 'schema validation' flag + /** Get the 'do schema' flag * - * This method returns the state of the parser's schema support + * This method returns the state of the parser's schema processing * flag. * * @return true, if the parser is currently configured to - * support schema, false otherwise. + * understand schema, false otherwise. * - * @see #setSchemaValidation + * @see #setDoSchema */ - bool getSchemaValidation() const; + bool getDoSchema() const; /** * This method returns the state of the parser's namespace @@ -330,20 +333,17 @@ public : /** Set the 'schema support' flag * * This method allows users to enable or disable the parser's - * schema support. + * schema processing. When set to false, parser will not process + * any schema found. * * The parser's default state is: true. * - * This flag is ignored by the underlying scanner if the validation - * is disable. - * * @param newState The value specifying whether schema support should * be enforced or not. * - * @see #getSchemaValidation - * @see #getValidationScheme + * @see #getDoSchema */ - void setSchemaValidation(const bool newState); + void setDoSchema(const bool newState); /**