peiyongz 2004/04/13 09:53:26 Modified: c/src/xercesc/parsers AbstractDOMParser.cpp AbstractDOMParser.hpp DOMBuilderImpl.cpp SAX2XMLReaderImpl.cpp SAXParser.cpp SAXParser.hpp Log: get/setIdentityConstraintChecking Revision Changes Path 1.62 +11 -1 xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp Index: AbstractDOMParser.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- AbstractDOMParser.cpp 29 Jan 2004 11:46:31 -0000 1.61 +++ AbstractDOMParser.cpp 13 Apr 2004 16:53:26 -0000 1.62 @@ -297,6 +297,11 @@ return fScanner->getValidationSchemaFullChecking(); } +bool AbstractDOMParser::getIdentityConstraintChecking() const +{ + return fScanner->getIdentityConstraintChecking(); +} + int AbstractDOMParser::getErrorCount() const { return fScanner->getErrorCount(); @@ -381,6 +386,11 @@ void AbstractDOMParser::setValidationSchemaFullChecking(const bool schemaFullChecking) { fScanner->setValidationSchemaFullChecking(schemaFullChecking); +} + +void AbstractDOMParser::setIdentityConstraintChecking(const bool identityConstraintChecking) +{ + fScanner->setIdentityConstraintChecking(identityConstraintChecking); } void AbstractDOMParser::setExternalSchemaLocation(const XMLCh* const schemaLocation) 1.28 +28 -1 xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.hpp Index: AbstractDOMParser.hpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.hpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- AbstractDOMParser.hpp 29 Jan 2004 11:46:32 -0000 1.27 +++ AbstractDOMParser.hpp 13 Apr 2004 16:53:26 -0000 1.28 @@ -225,6 +225,18 @@ */ bool getValidationSchemaFullChecking() const; + /** Get the identity constraint checking' flag + * + * This method returns the state of the parser's identity constraint + * checking flag. + * + * @return true, if the parser is currently configured to + * have identity constraint checking, false otherwise. + * + * @see setIdentityConstraintChecking + */ + bool getIdentityConstraintChecking() const; + /** Get error count from the last parse operation. * * This method returns the error count from the last parse @@ -582,6 +594,21 @@ * @see #getValidationSchemaFullChecking */ void setValidationSchemaFullChecking(const bool schemaFullChecking); + + /** + * This method allows users to enable or disable the parser's identity + * constraint checks. + * + * <p>By default, the parser does not to any identity constraint checks. + * The default value is false.</p> + * + * @param newState The value specifying whether the parser should + * do identity constraint checks or not in the + * input XML document. + * + * @see #getIdentityConstraintChecking + */ + void setIdentityConstraintChecking(const bool newState); /** * This method allows the user to specify a list of schemas to use. 1.36 +6 -1 xml-xerces/c/src/xercesc/parsers/DOMBuilderImpl.cpp Index: DOMBuilderImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/DOMBuilderImpl.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- DOMBuilderImpl.cpp 1 Apr 2004 21:57:43 -0000 1.35 +++ DOMBuilderImpl.cpp 13 Apr 2004 16:53:26 -0000 1.36 @@ -317,6 +317,11 @@ return getValidationSchemaFullChecking(); } + else if (XMLString::compareIString(name, XMLUni::fgXercesIdentityConstraintChecking) == 0) + { + return getIdentityConstraintChecking(); + } + else if (XMLString::compareIString(name, XMLUni::fgXercesLoadExternalDTD) == 0) { return getLoadExternalDTD(); 1.34 +9 -0 xml-xerces/c/src/xercesc/parsers/SAX2XMLReaderImpl.cpp Index: SAX2XMLReaderImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/SAX2XMLReaderImpl.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- SAX2XMLReaderImpl.cpp 29 Jan 2004 11:46:32 -0000 1.33 +++ SAX2XMLReaderImpl.cpp 13 Apr 2004 16:53:26 -0000 1.34 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.34 2004/04/13 16:53:26 peiyongz + * get/setIdentityConstraintChecking + * * Revision 1.33 2004/01/29 11:46:32 cargilld * Code cleanup changes to get rid of various compiler diagnostic messages. * @@ -1555,6 +1558,10 @@ { fScanner->setValidationSchemaFullChecking(value); } + else if (XMLString::compareIString(name, XMLUni::fgXercesIdentityConstraintChecking) == 0) + { + fScanner->setIdentityConstraintChecking(value); + } else if (XMLString::compareIString(name, XMLUni::fgXercesLoadExternalDTD) == 0) { fScanner->setLoadExternalDTD(value); @@ -1605,6 +1612,8 @@ return getDoSchema(); else if (XMLString::compareIString(name, XMLUni::fgXercesSchemaFullChecking) == 0) return fScanner->getValidationSchemaFullChecking(); + else if (XMLString::compareIString(name, XMLUni::fgXercesIdentityConstraintChecking) == 0) + return fScanner->getIdentityConstraintChecking(); else if (XMLString::compareIString(name, XMLUni::fgXercesLoadExternalDTD) == 0) return fScanner->getLoadExternalDTD(); else if (XMLString::compareIString(name, XMLUni::fgXercesContinueAfterFatalError) == 0) 1.32 +13 -0 xml-xerces/c/src/xercesc/parsers/SAXParser.cpp Index: SAXParser.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/SAXParser.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- SAXParser.cpp 29 Jan 2004 11:46:32 -0000 1.31 +++ SAXParser.cpp 13 Apr 2004 16:53:26 -0000 1.32 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.32 2004/04/13 16:53:26 peiyongz + * get/setIdentityConstraintChecking + * * Revision 1.31 2004/01/29 11:46:32 cargilld * Code cleanup changes to get rid of various compiler diagnostic messages. * @@ -514,6 +517,11 @@ return fScanner->getValidationSchemaFullChecking(); } +bool SAXParser::getIdentityConstraintChecking() const +{ + return fScanner->getIdentityConstraintChecking(); +} + int SAXParser::getErrorCount() const { return fScanner->getErrorCount(); @@ -618,6 +626,11 @@ void SAXParser::setValidationSchemaFullChecking(const bool schemaFullChecking) { fScanner->setValidationSchemaFullChecking(schemaFullChecking); +} + +void SAXParser::setIdentityConstraintChecking(const bool identityConstraintChecking) +{ + fScanner->setIdentityConstraintChecking(identityConstraintChecking); } void SAXParser::setExternalSchemaLocation(const XMLCh* const schemaLocation) 1.29 +29 -1 xml-xerces/c/src/xercesc/parsers/SAXParser.hpp Index: SAXParser.hpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/SAXParser.hpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- SAXParser.hpp 1 Dec 2003 23:23:26 -0000 1.28 +++ SAXParser.hpp 13 Apr 2004 16:53:26 -0000 1.29 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.29 2004/04/13 16:53:26 peiyongz + * get/setIdentityConstraintChecking + * * Revision 1.28 2003/12/01 23:23:26 neilg * fix for bug 25118; thanks to Jeroen Witmond * @@ -461,6 +464,18 @@ */ bool getValidationSchemaFullChecking() const; + /** Get the 'identity constraint checking' flag + * + * This method returns the state of the parser's identity constraint + * checking flag. + * + * @return true, if the parser is currently configured to + * have identity constraint checking, false otherwise. + * + * @see #setIdentityConstraintChecking + */ + bool getIdentityConstraintChecking() const; + /** Get error count from the last parse operation. * * This method returns the error count from the last parse @@ -734,6 +749,19 @@ * @see #getValidationSchemaFullChecking */ void setValidationSchemaFullChecking(const bool schemaFullChecking); + + /** + * This method allows the user to turn identity constraint checking on/off. + * Only takes effect if Schema validation is enabled. + * If turned off, identity constraint checking is not done. + * + * The parser's default state is: false. + * + * @param identityConstraintChecking True to turn on identity constraint checking. + * + * @see #getIdentityConstraintChecking + */ + void setIdentityConstraintChecking(const bool identityConstraintChecking); /** * This method allows users to set the parser's behaviour when it
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]