You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2005/07/23 23:13:13 UTC

svn commit: r224543 [5/5] - in /xerces/c/trunk: Projects/Win32/BCC.551/Xerces-all/XercesLib/ Projects/Win32/VC6/xerces-all/XercesLib/ Projects/Win32/VC7.1/xerces-all/CreateDOMDocument/ Projects/Win32/VC7.1/xerces-all/DOMCount/ Projects/Win32/VC7.1/xerc...

Copied: xerces/c/trunk/src/xercesc/parsers/DOMLSParserImpl.cpp (from r201963, xerces/c/trunk/src/xercesc/parsers/DOMBuilderImpl.cpp)
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/parsers/DOMLSParserImpl.cpp?p2=xerces/c/trunk/src/xercesc/parsers/DOMLSParserImpl.cpp&p1=xerces/c/trunk/src/xercesc/parsers/DOMBuilderImpl.cpp&r1=201963&r2=224543&rev=224543&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/DOMBuilderImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/DOMLSParserImpl.cpp Sat Jul 23 14:11:41 2005
@@ -28,16 +28,17 @@
 // ---------------------------------------------------------------------------
 //  Includes
 // ---------------------------------------------------------------------------
-#include <xercesc/parsers/DOMBuilderImpl.hpp>
+#include <xercesc/parsers/DOMLSParserImpl.hpp>
 #include <xercesc/util/IOException.hpp>
 #include <xercesc/dom/DOMEntityResolver.hpp>
 #include <xercesc/dom/DOMErrorHandler.hpp>
 #include <xercesc/dom/impl/DOMErrorImpl.hpp>
 #include <xercesc/dom/impl/DOMLocatorImpl.hpp>
+#include <xercesc/dom/impl/DOMConfigurationImpl.hpp>
 #include <xercesc/dom/DOMException.hpp>
 #include <xercesc/sax/SAXParseException.hpp>
 #include <xercesc/internal/XMLScanner.hpp>
-#include <xercesc/framework/Wrapper4DOMInputSource.hpp>
+#include <xercesc/framework/Wrapper4DOMLSInput.hpp>
 #include <xercesc/framework/XMLGrammarPool.hpp>
 #include <xercesc/framework/XMLSchemaDescription.hpp>
 #include <xercesc/util/Janitor.hpp>
@@ -50,9 +51,9 @@
 
 
 // ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Constructors and Destructor
+//  DOMLSParserImpl: Constructors and Destructor
 // ---------------------------------------------------------------------------
-DOMBuilderImpl::DOMBuilderImpl( XMLValidator* const   valToAdopt
+DOMLSParserImpl::DOMLSParserImpl( XMLValidator* const   valToAdopt
                               , MemoryManager* const  manager
                               , XMLGrammarPool* const gramPool) :
 
@@ -71,80 +72,117 @@
 }
 
 
-DOMBuilderImpl::~DOMBuilderImpl()
+DOMLSParserImpl::~DOMLSParserImpl()
 {
 }
 
 
 // ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Setter methods
+//  DOMLSParserImpl: Setter methods
 // ---------------------------------------------------------------------------
-void DOMBuilderImpl::setErrorHandler(DOMErrorHandler* const handler)
+bool DOMLSParserImpl::getBusy() const
 {
-    fErrorHandler = handler;
-    if (fErrorHandler) {
-        getScanner()->setErrorReporter(this);
-    }
-    else {
-        getScanner()->setErrorReporter(0);
-    }
+    return fParseInProgress;
 }
 
-void DOMBuilderImpl::setEntityResolver(DOMEntityResolver* const handler)
+// ---------------------------------------------------------------------------
+//  DOMLSParserImpl: Setter methods
+// ---------------------------------------------------------------------------
+void DOMLSParserImpl::setFilter(DOMLSParserFilter* const)
 {
-    fEntityResolver = handler;
-    if (fEntityResolver) {
-        getScanner()->setEntityHandler(this);
-        fXMLEntityResolver = 0;
-    }
-    else {
-        getScanner()->setEntityHandler(0);
-    }
+    throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0, getMemoryManager());
 }
 
-void DOMBuilderImpl::setXMLEntityResolver(XMLEntityResolver* const handler)
+// ---------------------------------------------------------------------------
+//  DOMLSParserImpl: DOMConfiguration methods
+// ---------------------------------------------------------------------------
+void DOMLSParserImpl::setParameter(const XMLCh* name, const void* value)
 {
-    fXMLEntityResolver = handler;
-    if (fXMLEntityResolver) {
-        getScanner()->setEntityHandler(this);
-        fEntityResolver = 0;
+    if (XMLString::compareIStringASCII(name, XMLUni::fgDOMResourceResolver) == 0) 
+    {
+        fEntityResolver = (DOMEntityResolver*)value;
+        if (fEntityResolver) {
+            getScanner()->setEntityHandler(this);
+            fXMLEntityResolver = 0;
+        }
+        else {
+            getScanner()->setEntityHandler(0);
+        }
     }
-    else {
-        getScanner()->setEntityHandler(0);
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMErrorHandler) == 0) 
+    {
+        fErrorHandler = (DOMErrorHandler*)value;
+        if (fErrorHandler) {
+            getScanner()->setErrorReporter(this);
+        }
+        else {
+            getScanner()->setErrorReporter(0);
+        }
     }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesEntityResolver) == 0) 
+    {
+        fXMLEntityResolver = (XMLEntityResolver*)value;
+        if (fXMLEntityResolver) {
+            getScanner()->setEntityHandler(this);
+            fEntityResolver = 0;
+        }
+        else {
+            getScanner()->setEntityHandler(0);
+        }
+    }
+	else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaExternalSchemaLocation) == 0)
+	{
+		setExternalSchemaLocation((XMLCh*)value);
+	}
+	else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation) == 0)
+	{
+		setExternalNoNamespaceSchemaLocation((XMLCh*)value);
+	}
+	else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSecurityManager) == 0)
+	{
+		setSecurityManager((SecurityManager*)value);
+	}
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesScannerName))
+    {
+        AbstractDOMParser::useScanner((const XMLCh*) value);
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesParserUseDocumentFromImplementation))
+    {
+        useImplementation((const XMLCh*) value);
+    }
+    else
+        throw DOMException(DOMException::NOT_FOUND_ERR, 0, getMemoryManager());
 }
 
-void DOMBuilderImpl::setFilter(DOMBuilderFilter* const)
-{
-    throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0, getMemoryManager());
-}
-
-
-// ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Feature methods
-// ---------------------------------------------------------------------------
-void DOMBuilderImpl::setFeature(const XMLCh* const name, const bool state)
+void DOMLSParserImpl::setParameter(const XMLCh* name, bool state)
 {
-    if (XMLString::compareIStringASCII(name, XMLUni::fgDOMEntities) == 0) {
-        setCreateEntityReferenceNodes(state);
+    if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCharsetOverridesXMLEncoding) == 0) 
+    {
+        // in fact, setting this has no effect to the parser
+        fCharsetOverridesXMLEncoding = state;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMComments) == 0) {
-        setCreateCommentNodes(state);
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMDisallowDoctype) == 0) 
+    {
+        // TODO
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMDatatypeNormalization) == 0) {
-        getScanner()->setNormalizeData(state);
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMIgnoreUnknownCharacterDenormalization) == 0) 
+    {
+        // TODO
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaces) == 0) {
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaces) == 0) 
+    {
         setDoNamespaces(state);
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMWhitespaceInElementContent) == 0) {
-        setIncludeIgnorableWhitespace(state);
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSupportedMediatypesOnly) == 0) 
+    {
+        if (state)
+            throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0, getMemoryManager());
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidation) == 0) {
-
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidate) == 0) 
+    {
         fValidation = state;
 
-        if (state) {
+        if (fValidation) {
             if (getValidationScheme() == AbstractDOMParser::Val_Never)
                 setValidationScheme(AbstractDOMParser::Val_Always);
         }
@@ -152,29 +190,73 @@
             setValidationScheme(AbstractDOMParser::Val_Never);
         }
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidateIfSchema) == 0) {
-
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidateIfSchema) == 0) 
+    {
         fAutoValidation = state;
 
-        if (state) {
+        if (fAutoValidation) {
             setValidationScheme(AbstractDOMParser::Val_Auto);
         }
         else {
             setValidationScheme(AbstractDOMParser::Val_Never);
         }
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCharsetOverridesXMLEncoding) == 0) {
-        // in fact, setting this has no effect to the parser
-        fCharsetOverridesXMLEncoding = state;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMWellFormed) == 0) 
+    {
+        if(state==false)
+            throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0, getMemoryManager());
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSupportedMediatypesOnly) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMInfoset) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMCanonicalForm) == 0 ) {
-        if (state)
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCanonicalForm) == 0 ) 
+    {
+        // TODO
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCDATASections) == 0 ) 
+    {
+        // TODO
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCheckCharacterNormalization) == 0 ) 
+    {
+        // TODO
+    }    
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMComments) == 0) 
+    {
+        setCreateCommentNodes(state);
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMDatatypeNormalization) == 0) 
+    {
+        getScanner()->setNormalizeData(state);
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMElementContentWhitespace) == 0) 
+    {
+        setIncludeIgnorableWhitespace(state);
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMEntities) == 0) 
+    {
+        setCreateEntityReferenceNodes(state);
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaceDeclarations) == 0) 
+    {
+        if (state==false)
             throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0, getMemoryManager());
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaceDeclarations) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMCDATASections) == 0 ) {
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNormalizeCharacters) == 0) 
+    {
+        // TODO
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSchemaLocation) == 0) 
+    {
+        // TODO
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSchemaType) == 0) 
+    {
+        // TODO
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSplitCDATASections) == 0) 
+    {
+        // TODO
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMInfoset) == 0) 
+    {
         if (!state)
             throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0, getMemoryManager());
     }
@@ -193,12 +275,10 @@
         else
             fUserAdoptsDocument = false;
     }
-
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesLoadExternalDTD) == 0)
     {
         setLoadExternalDTD(state);
     }
-
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesContinueAfterFatalError) == 0)
     {
         setExitOnFirstFatalError(!state);
@@ -259,239 +339,241 @@
     {
         getScanner()->setSkipDTDValidation(state);
     }
-    else {
+    else
         throw DOMException(DOMException::NOT_FOUND_ERR, 0, getMemoryManager());
-    }
 }
 
-bool DOMBuilderImpl::getFeature(const XMLCh* const name) const
+const void* DOMLSParserImpl::getParameter(const XMLCh* name) const
 {
-    if (XMLString::compareIStringASCII(name, XMLUni::fgDOMEntities) == 0) {
-        return getCreateEntityReferenceNodes();
+    if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCharsetOverridesXMLEncoding) == 0) 
+    {
+        return (void*)fCharsetOverridesXMLEncoding;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMComments) == 0) {
-        return getCreateCommentNodes();
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMDisallowDoctype) == 0) 
+    {
+        // TODO
+        return 0;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMDatatypeNormalization) == 0) {
-        return getScanner()->getNormalizeData();
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMIgnoreUnknownCharacterDenormalization) == 0) 
+    {
+        // TODO
+        return 0;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaces) == 0) {
-        return getDoNamespaces();
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaces) == 0) 
+    {
+        return (void*)getDoNamespaces();
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMWhitespaceInElementContent) == 0) {
-        return getIncludeIgnorableWhitespace();
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMResourceResolver) == 0) 
+    {
+        return fEntityResolver;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidation) == 0) {
-        return fValidation;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSupportedMediatypesOnly) == 0) 
+    {
+        return (void*)false;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidateIfSchema) == 0) {
-        return fAutoValidation;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidate) == 0) 
+    {
+        return (void*)fValidation;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCharsetOverridesXMLEncoding) == 0) {
-        return fCharsetOverridesXMLEncoding;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidateIfSchema) == 0) 
+    {
+        return (void*)fAutoValidation;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSupportedMediatypesOnly) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMInfoset) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMCanonicalForm) == 0 ) {
-        return false;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMWellFormed) == 0) 
+    {
+        return (void*)true;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaceDeclarations) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMCDATASections) == 0 ) {
-        return true;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCanonicalForm) == 0 ) 
+    {
+        // TODO
+        return 0;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCDATASections) == 0 ) 
+    {
+        // TODO
+        return 0;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMCheckCharacterNormalization) == 0 ) 
+    {
+        // TODO
+        return 0;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMComments) == 0) 
+    {
+        return (void*)getCreateCommentNodes();
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMDatatypeNormalization) == 0) 
+    {
+        return (void*)getScanner()->getNormalizeData();
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMElementContentWhitespace) == 0) 
+    {
+        return (void*)getIncludeIgnorableWhitespace();
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMEntities) == 0) 
+    {
+        return (void*)getCreateEntityReferenceNodes();
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMErrorHandler) == 0) 
+    {
+        return fErrorHandler;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaceDeclarations) == 0) 
+    {
+        return (void*)true;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNormalizeCharacters) == 0) 
+    {
+        return 0;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSchemaLocation) == 0) 
+    {
+        return 0;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSchemaType) == 0) 
+    {
+        return 0;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSplitCDATASections) == 0) 
+    {
+        return 0;
+    }
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMInfoset) == 0) 
+    {
+        return (void*)true;
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchema) == 0)
     {
-        return getDoSchema();
+        return (void*)getDoSchema();
     }
-
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaFullChecking) == 0)
     {
-        return getValidationSchemaFullChecking();
+        return (void*)getValidationSchemaFullChecking();
     }
-
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesIdentityConstraintChecking) == 0)
     {
-        return getIdentityConstraintChecking();
+        return (void*)getIdentityConstraintChecking();
     }
-
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesLoadExternalDTD) == 0)
     {
-        return getLoadExternalDTD();
+        return (void*)getLoadExternalDTD();
     }
-
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesContinueAfterFatalError) == 0)
     {
-        return !getExitOnFirstFatalError();
+        return (void*)!getExitOnFirstFatalError();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesValidationErrorAsFatal) == 0)
     {
-        return getValidationConstraintFatal();
+        return (void*)getValidationConstraintFatal();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesCacheGrammarFromParse) == 0)
     {
-        return getScanner()->isCachingGrammarFromParse();
+        return (void*)getScanner()->isCachingGrammarFromParse();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesUseCachedGrammarInParse) == 0)
     {
-        return getScanner()->isUsingCachedGrammarInParse();
+        return (void*)getScanner()->isUsingCachedGrammarInParse();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesCalculateSrcOfs) == 0)
     {
-        return getScanner()->getCalculateSrcOfs();
+        return (void*)getScanner()->getCalculateSrcOfs();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesStandardUriConformant) == 0)
     {
-        return getScanner()->getStandardUriConformant();
+        return (void*)getScanner()->getStandardUriConformant();
     }
-    else if(XMLString::compareIStringASCII(name, XMLUni::fgXercesUserAdoptsDOMDocument) == 0) {
-        return fUserAdoptsDocument;
+    else if(XMLString::compareIStringASCII(name, XMLUni::fgXercesUserAdoptsDOMDocument) == 0) 
+    {
+        return (void*)fUserAdoptsDocument;
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesDOMHasPSVIInfo) == 0) {
-        return getCreateSchemaInfo();
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesDOMHasPSVIInfo) == 0) 
+    {
+        return (void*)getCreateSchemaInfo();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesGenerateSyntheticAnnotations) == 0)
     {
-        return getScanner()->getGenerateSyntheticAnnotations();
+        return (void*)getScanner()->getGenerateSyntheticAnnotations();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesValidateAnnotations) == 0)
     {
-        return getScanner()->getValidateAnnotations();
+        return (void*)getScanner()->getValidateAnnotations();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesIgnoreCachedDTD) == 0)
     {
-        return getScanner()->getIgnoreCachedDTD();
+        return (void*)getScanner()->getIgnoreCachedDTD();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesIgnoreAnnotations) == 0)
     {
-        return getScanner()->getIgnoreAnnotations();
+        return (void*)getScanner()->getIgnoreAnnotations();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesDisableDefaultEntityResolution) == 0)
     {
-        return getScanner()->getDisableDefaultEntityResolution();
+        return (void*)getScanner()->getDisableDefaultEntityResolution();
     }
     else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSkipDTDValidation) == 0)
     {
-        return getScanner()->getSkipDTDValidation();
+        return (void*)getScanner()->getSkipDTDValidation();
     }
-    else {
-        throw DOMException(DOMException::NOT_FOUND_ERR, 0, getMemoryManager());
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesEntityResolver) == 0) 
+    {
+        return fXMLEntityResolver;
     }
-
-    return false;
-}
-
-bool DOMBuilderImpl::canSetFeature(const XMLCh* const name, const bool state) const
-{
-    if ((XMLString::compareIStringASCII(name, XMLUni::fgDOMEntities) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgDOMComments) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgDOMDatatypeNormalization) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaces) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidation) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgDOMValidateIfSchema) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgDOMCharsetOverridesXMLEncoding) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgDOMWhitespaceInElementContent) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesUserAdoptsDOMDocument) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesCalculateSrcOfs) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesStandardUriConformant) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesDOMHasPSVIInfo) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesValidateAnnotations) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesGenerateSyntheticAnnotations) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesIdentityConstraintChecking) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesIgnoreCachedDTD) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesIgnoreAnnotations) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesDisableDefaultEntityResolution) == 0) ||
-        (XMLString::compareIStringASCII(name, XMLUni::fgXercesSkipDTDValidation) == 0)       
-       ) {
-        return true;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaExternalSchemaLocation) == 0) 
+    {
+        return getExternalSchemaLocation();
     }
-
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMSupportedMediatypesOnly) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMInfoset) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMCanonicalForm) == 0 ) {
-        if (!state)
-            return true;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation) == 0) 
+    {
+        return getExternalNoNamespaceSchemaLocation();
     }
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgDOMNamespaceDeclarations) == 0 ||
-             XMLString::compareIStringASCII(name, XMLUni::fgDOMCDATASections) == 0 ) {
-        if (state)
-            return true;
+    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSecurityManager) == 0) 
+    {
+        return getSecurityManager();
     }
-    else if ((XMLString::compareIStringASCII(name, XMLUni::fgXercesSchema) == 0) ||
-             (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaFullChecking) == 0) ||
-             (XMLString::compareIStringASCII(name, XMLUni::fgXercesLoadExternalDTD) == 0) ||
-             (XMLString::compareIStringASCII(name, XMLUni::fgXercesContinueAfterFatalError) == 0) ||
-             (XMLString::compareIStringASCII(name, XMLUni::fgXercesValidationErrorAsFatal) == 0) ||
-             (XMLString::compareIStringASCII(name, XMLUni::fgXercesCacheGrammarFromParse) == 0) ||
-             (XMLString::compareIStringASCII(name, XMLUni::fgXercesUseCachedGrammarInParse) == 0)) {
+    else
+        throw DOMException(DOMException::NOT_FOUND_ERR, 0, getMemoryManager());
+}
+
+bool DOMLSParserImpl::canSetParameter(const XMLCh* name, const void* value) const
+{
+    if((XMLString::compareIStringASCII(name, XMLUni::fgDOMCharsetOverridesXMLEncoding) == 0)
+      )
         return true;
-    }
+    
     return false;
 }
 
-
-// ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Non standard extension
-// ---------------------------------------------------------------------------
-void DOMBuilderImpl::setProperty(const XMLCh* const name, void* value)
+bool DOMLSParserImpl::canSetParameter(const XMLCh* name, bool value) const
 {
-	if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaExternalSchemaLocation) == 0)
-	{
-		setExternalSchemaLocation((XMLCh*)value);
-	}
-
-	else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation) == 0)
-	{
-		setExternalNoNamespaceSchemaLocation((XMLCh*)value);
-	}
-	else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSecurityManager) == 0)
-	{
-		setSecurityManager((SecurityManager*)value);
-	}
-    else if (XMLString::equals(name, XMLUni::fgXercesScannerName))
-    {
-        AbstractDOMParser::useScanner((const XMLCh*) value);
-    }
-    else if (XMLString::equals(name, XMLUni::fgXercesParserUseDocumentFromImplementation))
-    {
-        useImplementation((const XMLCh*) value);
-    }
-
-    else
-      throw DOMException(DOMException::NOT_FOUND_ERR, 0, getMemoryManager());
+    return false;
 }
 
-
-void* DOMBuilderImpl::getProperty(const XMLCh* const name) const
+const RefVectorOf<const XMLCh*>* DOMLSParserImpl::getParameterNames() const
 {
-    if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaExternalSchemaLocation) == 0)
-        return (void*)getExternalSchemaLocation();
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation) == 0)
-        return (void*)getExternalNoNamespaceSchemaLocation();
-    else if (XMLString::compareIStringASCII(name, XMLUni::fgXercesSecurityManager) == 0)
-        return (void*)getSecurityManager();
-    else
-        throw DOMException(DOMException::NOT_FOUND_ERR, 0, getMemoryManager());
     return 0;
 }
 
-void DOMBuilderImpl::release()
+// ---------------------------------------------------------------------------
+//  DOMLSParserImpl: Feature methods
+// ---------------------------------------------------------------------------
+void DOMLSParserImpl::release()
 {
-    DOMBuilderImpl* builder = (DOMBuilderImpl*) this;
+    DOMLSParserImpl* builder = (DOMLSParserImpl*) this;
     delete builder;
 }
 
-void DOMBuilderImpl::resetDocumentPool()
+void DOMLSParserImpl::resetDocumentPool()
 {
     resetPool();
 }
 
 
 // ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Parsing methods
+//  DOMLSParserImpl: Parsing methods
 // ---------------------------------------------------------------------------
-DOMDocument* DOMBuilderImpl::parse(const DOMInputSource& source)
+DOMDocument* DOMLSParserImpl::parse(const DOMLSInput& source)
 {
-    Wrapper4DOMInputSource isWrapper((DOMInputSource*) &source, false, getMemoryManager());
+    Wrapper4DOMLSInput isWrapper((DOMLSInput*) &source, false, getMemoryManager());
 
     AbstractDOMParser::parse(isWrapper);
     if (fUserAdoptsDocument)
@@ -500,7 +582,7 @@
         return getDocument();
 }
 
-DOMDocument* DOMBuilderImpl::parseURI(const XMLCh* const systemId)
+DOMDocument* DOMLSParserImpl::parseURI(const XMLCh* const systemId)
 {
     AbstractDOMParser::parse(systemId);
     if (fUserAdoptsDocument)
@@ -509,7 +591,7 @@
         return getDocument();
 }
 
-DOMDocument* DOMBuilderImpl::parseURI(const char* const systemId)
+DOMDocument* DOMLSParserImpl::parseURI(const char* const systemId)
 {
     AbstractDOMParser::parse(systemId);
     if (fUserAdoptsDocument)
@@ -518,18 +600,22 @@
         return getDocument();
 }
 
-void DOMBuilderImpl::parseWithContext(const DOMInputSource&,
-                                      DOMNode* const,
-                                      const short)
+void DOMLSParserImpl::parseWithContext(const DOMLSInput&,
+                                      DOMNode* ,
+                                      const unsigned short)
 {
     throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0, getMemoryManager());
 }
 
+void DOMLSParserImpl::abort()
+{
+    throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0, getMemoryManager());
+}
 
 // ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Implementation of the XMLErrorReporter interface
+//  DOMLSParserImpl: Implementation of the XMLErrorReporter interface
 // ---------------------------------------------------------------------------
-void DOMBuilderImpl::error( const   unsigned int                code
+void DOMLSParserImpl::error( const   unsigned int                code
                             , const XMLCh* const
                             , const XMLErrorReporter::ErrTypes  errType
                             , const XMLCh* const                errorText
@@ -556,16 +642,16 @@
     }
 }
 
-void DOMBuilderImpl::resetErrors()
+void DOMLSParserImpl::resetErrors()
 {
 }
 
 
 // ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Implementation of XMLEntityHandler interface
+//  DOMLSParserImpl: Implementation of XMLEntityHandler interface
 // ---------------------------------------------------------------------------
 InputSource*
-DOMBuilderImpl::resolveEntity(const XMLCh* const publicId,
+DOMLSParserImpl::resolveEntity(const XMLCh* const publicId,
                               const XMLCh* const systemId,
                               const XMLCh* const baseURI)
 {
@@ -575,28 +661,30 @@
     //
     if (fEntityResolver) {
 
-        DOMInputSource* is = fEntityResolver->resolveEntity(publicId, systemId, baseURI);
+        DOMLSInput* is = fEntityResolver->resolveEntity(0, 0, publicId, systemId, baseURI);
 
         if (is)
-            return new (getMemoryManager()) Wrapper4DOMInputSource(is, true, getMemoryManager());
+            return new (getMemoryManager()) Wrapper4DOMLSInput(is, true, getMemoryManager());
     }
 
     return 0;
 }
 
 InputSource*
-DOMBuilderImpl::resolveEntity( XMLResourceIdentifier* resourceIdentifier )
+DOMLSParserImpl::resolveEntity( XMLResourceIdentifier* resourceIdentifier )
 {
     //
     //  Just map it to the SAX entity resolver. If there is not one installed,
     //  return a null pointer to cause the default resolution.
     //
     if (fEntityResolver) {
-        DOMInputSource* is = fEntityResolver->resolveEntity(resourceIdentifier->getPublicId(),
-                                                            resourceIdentifier->getSystemId(), 
-                                                            resourceIdentifier->getBaseURI());
+        DOMLSInput* is = fEntityResolver->resolveEntity(resourceIdentifier->getResourceIdentifierType()==XMLResourceIdentifier::ExternalEntity?XMLUni::fgDOMDTDType:XMLUni::fgDOMXMLSchemaType,
+                                                        resourceIdentifier->getNameSpace(),
+                                                        resourceIdentifier->getPublicId(),
+                                                        resourceIdentifier->getSystemId(), 
+                                                        resourceIdentifier->getBaseURI());
         if (is)
-            return new (getMemoryManager()) Wrapper4DOMInputSource(is, true, getMemoryManager());    
+            return new (getMemoryManager()) Wrapper4DOMLSInput(is, true, getMemoryManager());    
     }
     if (fXMLEntityResolver) {
         return(fXMLEntityResolver->resolveEntity(resourceIdentifier));    
@@ -605,12 +693,12 @@
     return 0;
 }
 
-typedef JanitorMemFunCall<DOMBuilderImpl>    ResetParseType;
+typedef JanitorMemFunCall<DOMLSParserImpl>    ResetParseType;
 
 // ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Grammar preparsing methods
+//  DOMLSParserImpl: Grammar preparsing methods
 // ---------------------------------------------------------------------------
-Grammar* DOMBuilderImpl::loadGrammar(const char* const systemId,
+Grammar* DOMLSParserImpl::loadGrammar(const char* const systemId,
                                      const short grammarType,
                                      const bool toCache)
 {
@@ -618,7 +706,7 @@
     if (getParseInProgress())
         ThrowXMLwithMemMgr(IOException, XMLExcepts::Gen_ParseInProgress, fMemoryManager);
 
-    ResetParseType  resetParse(this, &DOMBuilderImpl::resetParse);
+    ResetParseType  resetParse(this, &DOMLSParserImpl::resetParse);
 
 	Grammar* grammar = 0;
 
@@ -644,7 +732,7 @@
     return grammar;
 }
 
-Grammar* DOMBuilderImpl::loadGrammar(const XMLCh* const systemId,
+Grammar* DOMLSParserImpl::loadGrammar(const XMLCh* const systemId,
                                      const short grammarType,
                                      const bool toCache)
 {
@@ -652,7 +740,7 @@
     if (getParseInProgress())
         ThrowXMLwithMemMgr(IOException, XMLExcepts::Gen_ParseInProgress, fMemoryManager);
 
-    ResetParseType  resetParse(this, &DOMBuilderImpl::resetParse);
+    ResetParseType  resetParse(this, &DOMLSParserImpl::resetParse);
 
 	Grammar* grammar = 0;
 
@@ -678,7 +766,7 @@
     return grammar;
 }
 
-Grammar* DOMBuilderImpl::loadGrammar(const DOMInputSource& source,
+Grammar* DOMLSParserImpl::loadGrammar(const DOMLSInput& source,
                                      const short grammarType,
                                      const bool toCache)
 {
@@ -686,13 +774,13 @@
     if (getParseInProgress())
         ThrowXMLwithMemMgr(IOException, XMLExcepts::Gen_ParseInProgress, fMemoryManager);
 
-    ResetParseType  resetParse(this, &DOMBuilderImpl::resetParse);
+    ResetParseType  resetParse(this, &DOMLSParserImpl::resetParse);
 
     Grammar* grammar = 0;
 
     try
     {
-        Wrapper4DOMInputSource isWrapper((DOMInputSource*) &source, false, getMemoryManager());
+        Wrapper4DOMLSInput isWrapper((DOMLSInput*) &source, false, getMemoryManager());
 
         setParseInProgress(true);
         if (grammarType == Grammar::DTDGrammarType) 
@@ -714,12 +802,12 @@
     return grammar;
 }
 
-void DOMBuilderImpl::resetCachedGrammarPool()
+void DOMLSParserImpl::resetCachedGrammarPool()
 {
     getGrammarResolver()->resetCachedGrammar();
 }
 
-void DOMBuilderImpl::resetParse()
+void DOMLSParserImpl::resetParse()
 {
     if (getScanner()->getDocTypeHandler() == 0)
     {
@@ -729,22 +817,22 @@
     setParseInProgress(false);
 }
 
-Grammar* DOMBuilderImpl::getGrammar(const XMLCh* const nameSpaceKey) const
+Grammar* DOMLSParserImpl::getGrammar(const XMLCh* const nameSpaceKey) const
 {
     return getGrammarResolver()->getGrammar(nameSpaceKey);
 }
 
-Grammar* DOMBuilderImpl::getRootGrammar() const
+Grammar* DOMLSParserImpl::getRootGrammar() const
 {
     return getScanner()->getRootGrammar();
 }
 
-const XMLCh* DOMBuilderImpl::getURIText(unsigned int uriId) const
+const XMLCh* DOMLSParserImpl::getURIText(unsigned int uriId) const
 {
     return getScanner()->getURIText(uriId);
 }
 
-unsigned int DOMBuilderImpl::getSrcOffset() const
+unsigned int DOMLSParserImpl::getSrcOffset() const
 {
     return getScanner()->getSrcOffset();
 }

Copied: xerces/c/trunk/src/xercesc/parsers/DOMLSParserImpl.hpp (from r201963, xerces/c/trunk/src/xercesc/parsers/DOMBuilderImpl.hpp)
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/parsers/DOMLSParserImpl.hpp?p2=xerces/c/trunk/src/xercesc/parsers/DOMLSParserImpl.hpp&p1=xerces/c/trunk/src/xercesc/parsers/DOMBuilderImpl.hpp&r1=201963&r2=224543&rev=224543&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/DOMBuilderImpl.hpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/DOMLSParserImpl.hpp Sat Jul 23 14:11:41 2005
@@ -24,7 +24,9 @@
 
 
 #include <xercesc/parsers/AbstractDOMParser.hpp>
-#include <xercesc/dom/DOMBuilder.hpp>
+#include <xercesc/dom/DOMLSParser.hpp>
+#include <xercesc/dom/DOMLSInput.hpp>
+#include <xercesc/dom/DOMConfiguration.hpp>
 #include <xercesc/util/XercesDefs.hpp>
 
 
@@ -36,12 +38,13 @@
  /**
   * Introduced in DOM Level 3
   *
-  * DOMBuilderImpl provides an implementation of a DOMBuilder interface.
-  * A DOMBuilder instance is obtained from the DOMImplementationLS interface
-  * by invoking its createDOMBuilder method.
+  * DOMLSParserImpl provides an implementation of a DOMLSParser interface.
+  * A DOMLSParser instance is obtained from the DOMImplementationLS interface
+  * by invoking its createDOMLSParser method.
   */
-class PARSERS_EXPORT DOMBuilderImpl : public AbstractDOMParser,
-                                      public DOMBuilder
+class PARSERS_EXPORT DOMLSParserImpl : public AbstractDOMParser,
+                                       public DOMLSParser,
+                                       public DOMConfiguration
 {
 public :
     // -----------------------------------------------------------------------
@@ -50,7 +53,7 @@
 
     /** @name Constructors and Destructor */
     //@{
-    /** Construct a DOMBuilderImpl, with an optional validator
+    /** Construct a DOMLSParserImpl, with an optional validator
       *
       * Constructor with an instance of validator class to use for
       * validation. If you don't provide a validator, a default one will
@@ -63,7 +66,7 @@
       * @param valToAdopt Pointer to the validator instance to use. The
       *                   parser is responsible for freeing the memory.
       */
-    DOMBuilderImpl
+    DOMLSParserImpl
     (
           XMLValidator* const   valToAdopt = 0
         , MemoryManager* const  manager = XMLPlatformUtils::fgMemoryManager
@@ -73,12 +76,12 @@
     /**
       * Destructor
       */
-    virtual ~DOMBuilderImpl();
+    virtual ~DOMLSParserImpl();
 
     //@}
 
     // -----------------------------------------------------------------------
-    //  Implementation of DOMBuilder interface
+    //  Implementation of DOMLSParser interface
     // -----------------------------------------------------------------------
     // -----------------------------------------------------------------------
     //  Getter methods
@@ -88,97 +91,24 @@
     //@{
 
     /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Get a pointer to the error handler
-      *
-      * This method returns the installed error handler. If no handler
-      * has been installed, then it will be a zero pointer.
-      *
-      * @return The pointer to the installed error handler object.
+      * @see DOMLSParser#getDomConfig
       */
-    DOMErrorHandler* getErrorHandler();
+    virtual DOMConfiguration* getDomConfig();
 
     /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Get a const pointer to the error handler
-      *
-      * This method returns the installed error handler.  If no handler
-      * has been installed, then it will be a zero pointer.
-      *
-      * @return A const pointer to the installed error handler object.
+      * @see DOMLSParser#getFilter
       */
-    const DOMErrorHandler* getErrorHandler() const;
+    virtual const DOMLSParserFilter* getFilter() const;
 
     /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Get a pointer to the entity resolver
-      *
-      * This method returns the installed entity resolver.  If no resolver
-      * has been installed, then it will be a zero pointer.
-      *
-      * @return The pointer to the installed entity resolver object.
+      * @see DOMLSParser#getAsync
       */
-    DOMEntityResolver* getEntityResolver();
+    virtual bool getAsync() const;
 
     /**
-      * Get a pointer to the entity resolver
-      *
-      * This method returns the installed entity resolver.  If no resolver
-      * has been installed, then it will be a zero pointer.
-      *
-      * @return The pointer to the installed entity resolver object.
-      */
-    XMLEntityResolver* getXMLEntityResolver();
- 
-    /**
-      * Get a const pointer to the entity resolver
-      *
-      * This method returns the installed entity resolver. If no resolver
-      * has been installed, then it will be a zero pointer.
-      *
-      * @return A const pointer to the installed entity resolver object.
-      */
-    const XMLEntityResolver* getXMLEntityResolver() const;
-
-    /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Get a const pointer to the entity resolver
-      *
-      * This method returns the installed entity resolver. If no resolver
-      * has been installed, then it will be a zero pointer.
-      *
-      * @return A const pointer to the installed entity resolver object.
+      * @see DOMLSParser#getBusy
       */
-    const DOMEntityResolver* getEntityResolver() const;
-
-    /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Get a pointer to the application filter
-      *
-      * This method returns the installed application filter. If no filter
-      * has been installed, then it will be a zero pointer.
-      *
-      * @return The pointer to the installed application filter.
-      */
-    DOMBuilderFilter* getFilter();
-
-    /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Get a const pointer to the application filter
-      *
-      * This method returns the installed application filter. If no filter
-      * has been installed, then it will be a zero pointer.
-      *
-      * @return A const pointer to the installed application filter
-      */
-    const DOMBuilderFilter* getFilter() const;
-
+    virtual bool getBusy() const;
     //@}
 
 
@@ -188,267 +118,52 @@
 
     /** @name Setter methods */
     //@{
-
-    /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Set the error handler
-      *
-      * This method allows applications to install their own error handler
-      * to trap error and warning messages.
-      *
-      * <i>Any previously set handler is merely dropped, since the parser
-      * does not own them.</i>
-      *
-      * @param handler  A const pointer to the user supplied error
-      *                 handler.
-      *
-      * @see #getErrorHandler
-      */
-    void setErrorHandler(DOMErrorHandler* const handler);
-
     /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Set the entity resolver
-      *
-      * This method allows applications to install their own entity
-      * resolver. By installing an entity resolver, the applications
-      * can trap and potentially redirect references to external
-      * entities.
-      *
-      * <i>Any previously set entity resolver is merely dropped, since the parser
-      * does not own them.  If both setEntityResolver and setXMLEntityResolver
-      * are called, then the last one is used.</i>
-      *
-      * @param handler  A const pointer to the user supplied entity
-      *                 resolver.
-      *
-      * @see #getEntityResolver
+      * @see DOMLSParser#setFilter
       */
-    void setEntityResolver(DOMEntityResolver* const handler);
-
-    /**
-      * Set the entity resolver
-      *
-      * This method allows applications to install their own entity
-      * resolver. By installing an entity resolver, the applications
-      * can trap and potentially redirect references to external
-      * entities.
-      *
-      * <i>Any previously set entity resolver is merely dropped, since the parser
-      * does not own them.  If both setEntityResolver and setXMLEntityResolver
-      * are called, then the last one is used.</i>
-      *
-      * @param handler  A const pointer to the user supplied entity
-      *                 resolver.
-      *
-      * @see #getXMLEntityResolver
-      */
-    void setXMLEntityResolver(XMLEntityResolver* const handler);
-
-    /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Set the application filter
-      *
-      * When the application provides a filter, the parser will call out to
-      * the filter at the completion of the construction of each Element node.
-      * The filter implementation can choose to remove the element from the
-      * document being constructed (unless the element is the document element)
-      * or to terminate the parse early. If the document is being validated
-      * when it's loaded the validation happens before the filter is called.
-      *
-      * <i>Any previously set filter is merely dropped, since the parser
-      * does not own them.</i>
-      *
-      * @param filter  A const pointer to the user supplied application
-      *                filter.
-      *
-      * @see #getFilter
-      */
-    void setFilter(DOMBuilderFilter* const filter);
+    virtual void setFilter(DOMLSParserFilter* const filter);
 
     //@}
 
-
     // -----------------------------------------------------------------------
-    //  Feature methods
+    //  Parsing methods
     // -----------------------------------------------------------------------
-    /** @name Feature methods */
+    /** @name Parsing methods */
     //@{
 
-    /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Set the state of a feature
-      *
-      * It is possible for a DOMBuilder to recognize a feature name but to be
-      * unable to set its value.
-      *
-      * @param name  The feature name.
-      * @param state The requested state of the feature (true or false).
-      * @exception DOMException
-      *     NOT_SUPPORTED_ERR: Raised when the DOMBuilder recognizes the
-      *     feature name but cannot set the requested value.
-      *     <br>NOT_FOUND_ERR: Raised when the DOMBuilder does not recognize
-      *     the feature name.
-      *
-      * @see #getFeature
-      * @see #canSetFeature
-      */
-    void setFeature(const XMLCh* const name, const bool state);
-
-    /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Look up the value of a feature.
-      *
-      * @param name The feature name.
-      * @return The current state of the feature (true or false)
-      * @exception DOMException
-      *     NOT_FOUND_ERR: Raised when the DOMBuilder does not recognize
-      *     the feature name.
-      *
-      * @see #setFeature
-      * @see #canSetFeature
-      */
-    bool getFeature(const XMLCh* const name) const;
-
-    /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Query whether setting a feature to a specific value is supported.
-      *
-      * @param name  The feature name.
-      * @param state The requested state of the feature (true or false).
-      * @return <code>true</code> if the feature could be successfully set
-      *     to the specified value, or <code>false</code> if the feature
-      *     is not recognized or the requested value is not supported. The
-      *     value of the feature itself is not changed.
-      *
-      * @see #getFeature
-      * @see #setFeature
-      */
-    bool canSetFeature(const XMLCh* const name, const bool state) const;
-
-    //@}
-
     // -----------------------------------------------------------------------
     //  Parsing methods
     // -----------------------------------------------------------------------
-    /** @name Parsing methods */
-    //@{
-
     /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Parse via an input source object
-      *
-      * This method invokes the parsing process on the XML file specified
-      * by the DOMInputSource parameter. This API is borrowed from the
-      * SAX Parser interface.
-      *
-      * @param source A const reference to the DOMInputSource object which
-      *               points to the XML file to be parsed.
-      * @return If the DOMBuilder is a synchronous DOMBuilder the newly created
-      *         and populated Document is returned. If the DOMBuilder is
-      *         asynchronous then <code>null</code> is returned since the
-      *         document object is not yet parsed when this method returns.
-      * @exception SAXException Any SAX exception, possibly
-      *            wrapping another exception.
-      * @exception XMLException An exception from the parser or client
-      *            handler code.
-      * @exception DOMException A DOM exception as per DOM spec.
-      *
-      * @see DOMInputSource#DOMInputSource
-      * @see #setEntityResolver
-      * @see #setErrorHandler
+      * @see DOMLSParser#parse
       */
-    DOMDocument* parse(const DOMInputSource& source);
+    virtual DOMDocument* parse(const DOMLSInput& source);
 
     /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Parse via a file path or URL
-      *
-      * This method invokes the parsing process on the XML file specified by
-      * the Unicode string parameter 'systemId'.
-      *
-      * @param systemId A const XMLCh pointer to the Unicode string which
-      *                 contains the path to the XML file to be parsed.
-      * @return If the DOMBuilder is a synchronous DOMBuilder the newly created
-      *         and populated Document is returned. If the DOMBuilder is
-      *         asynchronous then <code>null</code> is returned since the
-      *         document object is not yet parsed when this method returns.
-      * @exception SAXException Any SAX exception, possibly
-      *            wrapping another exception.
-      * @exception XMLException An exception from the parser or client
-      *            handler code.
-      * @exception DOM_DOMException A DOM exception as per DOM spec.
-      *
-      * @see #parse(DOMInputSource,...)
+      * @see DOMLSParser#parseURI
       */
-    DOMDocument* parseURI(const XMLCh* const systemId);
+    virtual DOMDocument* parseURI(const XMLCh* const uri);
 
     /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Parse via a file path or URL (in the local code page)
-      *
-      * This method invokes the parsing process on the XML file specified by
-      * the native char* string parameter 'systemId'.
-      *
-      * @param systemId A const char pointer to a native string which
-      *                 contains the path to the XML file to be parsed.
-      * @return If the DOMBuilder is a synchronous DOMBuilder the newly created
-      *         and populated Document is returned. If the DOMBuilder is
-      *         asynchronous then <code>null</code> is returned since the
-      *         document object is not yet parsed when this method returns.
-      * @exception SAXException Any SAX exception, possibly
-      *            wrapping another exception.
-      * @exception XMLException An exception from the parser or client
-      *            handler code.
-      * @exception DOM_DOMException A DOM exception as per DOM spec.
-      *
-      * @see #parse(DOMInputSource,...)
+      * @see DOMLSParser#parseURI
       */
-    DOMDocument* parseURI(const char* const systemId);
+    virtual DOMDocument* parseURI(const char* const uri);
 
     /**
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * Parse via an input source object
-      *
-      * This method invokes the parsing process on the XML file specified
-      * by the DOMInputSource parameter, and inserts the content into an
-      * existing document at the position specified with the contextNode
-      * and action arguments. When parsing the input stream the context node
-      * is used for resolving unbound namespace prefixes.
-      *
-      * @param source A const reference to the DOMInputSource object which
-      *               points to the XML file to be parsed.
-      * @param contextNode The node that is used as the context for the data
-      *                    that is being parsed. This node must be a Document
-      *                    node, a DocumentFragment node, or a node of a type
-      *                    that is allowed as a child of an element, e.g. it
-      *                    can not be an attribute node.
-      * @param action This parameter describes which action should be taken
-      *               between the new set of node being inserted and the
-      *               existing children of the context node.
-      * @exception DOMException
-      *     NOT_SUPPORTED_ERR: Raised when the DOMBuilder doesn't support
-      *     this method.
-      *     <br>NO_MODIFICATION_ALLOWED_ERR: Raised if the context node is
-      *     readonly.
+      * @see DOMLSParser#parseWithContext
       */
     virtual void parseWithContext
     (
-        const   DOMInputSource& source
-        ,       DOMNode* const contextNode
-        , const short action
+        const   DOMLSInput&     source
+        ,       DOMNode*        contextNode
+        , const unsigned short  action
     );
 
+    /**
+      * @see DOMLSParser#abort
+      */
+    virtual void abort();
+
 
     // -----------------------------------------------------------------------
     //  Non-standard Extension
@@ -457,53 +172,7 @@
     //@{
 
     /**
-      * Query the current value of a property in a DOMBuilder.
-      *
-      * The builder owns the returned pointer.  The memory allocated for
-      * the returned pointer will be destroyed when the builder is deleted.
-      *
-      * To ensure assessiblity of the returned information after the builder
-      * is deleted, callers need to copy and store the returned information
-      * somewhere else; otherwise you may get unexpected result.  Since the returned
-      * pointer is a generic void pointer, see
-      * http://xml.apache.org/xerces-c/program-dom.html#DOMBuilderProperties to learn
-      * exactly what type of property value each property returns for replication.
-      *
-      * @param name The unique identifier (URI) of the property being set.
-      * @return     The current value of the property.  The pointer spans the same
-      *             life-time as the parser.  A null pointer is returned if nothing
-      *             was specified externally.
-      * @exception DOMException
-      *     <br>NOT_FOUND_ERR: Raised when the DOMBuilder does not recognize
-      *     the requested property.
-      */
-    virtual void* getProperty(const XMLCh* const name) const;
-
-    /**
-      * Set the value of any property in a DOMBuilder.
-      * See http://xml.apache.org/xerces-c/program-dom.html#DOMBuilderProperties for
-      * the list of supported properties.
-      *
-      * It takes a void pointer as the property value.  Application is required to initialize this void
-      * pointer to a correct type.  See http://xml.apache.org/xerces-c/program-dom.html#DOMBuilderProperties
-      * to learn exactly what type of property value each property expects for processing.
-      * Passing a void pointer that was initialized with a wrong type will lead to unexpected result.
-      * If the same property is set more than once, the last one takes effect.
-      *
-      * @param name The unique identifier (URI) of the property being set.
-      * @param value The requested value for the property.
-      *            See http://xml.apache.org/xerces-c/program-dom.html#DOMBuilderProperties to learn
-      *            exactly what type of property value each property expects for processing.
-      *            Passing a void pointer that was initialized with a wrong type will lead
-      *            to unexpected result.
-      * @exception DOMException
-      *     <br>NOT_FOUND_ERR: Raised when the DOMBuilder does not recognize
-      *     the requested property.
-      */
-    virtual void setProperty(const XMLCh* const name, void* value);
-
-    /**
-     * Called to indicate that this DOMBuilder is no longer in use
+     * Called to indicate that this DOMLSParser is no longer in use
      * and that the implementation may relinquish any resources associated with it.
      *
      */
@@ -539,13 +208,11 @@
       * object.
       *
       * This method invokes the preparsing process on a schema grammar XML
-      * file specified by the DOMInputSource parameter. If the 'toCache' flag
+      * file specified by the DOMLSInput parameter. If the 'toCache' flag
       * is enabled, the parser will cache the grammars for re-use. If a grammar
       * key is found in the pool, no caching of any grammar will take place.
       *
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
-      * @param source A const reference to the DOMInputSource object which
+      * @param source A const reference to the DOMLSInput object which
       *               points to the schema grammar file to be preparsed.
       * @param grammarType The grammar type (Schema or DTD).
       * @param toCache If <code>true</code>, we cache the preparsed grammar,
@@ -559,9 +226,9 @@
       *            handler code.
       * @exception DOMException A DOM exception as per DOM spec.
       *
-      * @see DOMInputSource#DOMInputSource
+      * @see DOMLSInput#DOMLSInput
       */
-    virtual Grammar* loadGrammar(const DOMInputSource& source,
+    virtual Grammar* loadGrammar(const DOMLSInput& source,
                              const short grammarType,
                              const bool toCache = false);
 
@@ -573,8 +240,6 @@
       * is enabled, the parser will cache the grammars for re-use. If a grammar
       * key is found in the pool, no caching of any grammar will take place.
       *
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
       * @param systemId A const XMLCh pointer to the Unicode string which
       *                 contains the path to the XML grammar file to be
       *                 preparsed.
@@ -602,8 +267,6 @@
       * is enabled, the parser will cache the grammars for re-use. If a grammar
       * key is found in the pool, no caching of any grammar will take place.
       *
-      * <p><b>"Experimental - subject to change"</b></p>
-      *
       * @param systemId A const char pointer to a native string which contains
       *                 the path to the XML grammar file to be preparsed.
       * @param grammarType The grammar type (Schema or DTD).
@@ -661,6 +324,73 @@
     //@}
 
     // -----------------------------------------------------------------------
+    //  Implementation of the DOMConfiguration interface.
+    // -----------------------------------------------------------------------
+    /** @name Implementation of the DOMConfiguration interface. */
+    //@{
+    /** 
+     * Set the value of a parameter. 
+     *
+     * @param name The name of the parameter to set.
+     * @param value The new value or null if the user wishes to unset the 
+     * parameter. While the type of the value parameter is defined as 
+     * <code>DOMUserData</code>, the object type must match the type defined
+     * by the definition of the parameter. For example, if the parameter is 
+     * "error-handler", the value must be of type <code>DOMErrorHandler</code>
+     *
+     * @exception DOMException (NOT_SUPPORTED_ERR) Raised when the 
+     * parameter name is recognized but the requested value cannot be set.
+     * @exception DOMException (NOT_FOUND_ERR) Raised when the 
+     * parameter name is not recognized.
+     *
+     * @since DOM level 3
+     **/
+    virtual void setParameter(const XMLCh* name, const void* value);
+    virtual void setParameter(const XMLCh* name, bool value);
+
+    /** 
+     * Return the value of a parameter if known. 
+     *
+     * @param name The name of the parameter.
+     * @return The current object associated with the specified parameter or 
+     * null if no object has been associated or if the parameter is not 
+     * supported.
+     *
+     * @exception DOMException (NOT_FOUND_ERR) Raised when the i
+     * boolean parameter 
+     * name is not recognized.
+     *
+     * @since DOM level 3
+     **/    
+    virtual const void* getParameter(const XMLCh* name) const;
+
+    /** 
+     * Check if setting a parameter to a specific value is supported. 
+     *
+     * @param name The name of the parameter to check.
+     * @param value An object. if null, the returned value is true.
+     * @return true if the parameter could be successfully set to the specified 
+     * value, or false if the parameter is not recognized or the requested value 
+     * is not supported. This does not change the current value of the parameter 
+     * itself.
+     *
+     * @since DOM level 3
+     **/
+    virtual bool canSetParameter(const XMLCh* name, const void* value) const;
+    virtual bool canSetParameter(const XMLCh* name, bool value) const;
+
+    /**
+     * The list of the parameters supported by this DOMConfiguration object and 
+     * for which at least one value can be set by the application. 
+     * Note that this list can also contain parameter names defined outside this specification.
+     *
+     * @return The list of parameters that can be used with setParameter/getParameter
+     * @since DOM level 3
+     **/
+    virtual const RefVectorOf<const XMLCh*>* getParameterNames() const;
+    //@}
+
+    // -----------------------------------------------------------------------
     //  Implementation of the XMLErrorReporter interface.
     // -----------------------------------------------------------------------
 
@@ -785,7 +515,7 @@
       *                 or <code>null</code> if there is no base URI.
       * @return The value returned by the user installed resolveEntity
       *         method or NULL otherwise to indicate no processing was done.
-      *         The returned InputSource is owned by the DOMBuilder which is
+      *         The returned InputSource is owned by the DOMLSParser which is
       *         responsible to clean up the memory.
       * @see DOMEntityResolver
       * @see XMLEntityHandler
@@ -844,9 +574,19 @@
     // -----------------------------------------------------------------------
     //  Private data members
     //
+    //  fAutoValidation
+    //      Whether validation will be enabled in case a schema reference is found
+    //
+    //  fValidation
+    //      Whether validation will be enabled (if fAutoValidation has been set, 
+    //      setting it is a no-op)
+    //
     //  fEntityResolver
     //      The installed DOM entity resolver, if any. Null if none.
     //
+    //  fXMLEntityResolver
+    //      The installed Xerces entity resolver, if any. Null if none.
+    // 
     //  fErrorHandler
     //      The installed DOM error handler, if any. Null if none.
     //
@@ -866,83 +606,59 @@
     DOMEntityResolver*          fEntityResolver;
     XMLEntityResolver*          fXMLEntityResolver;
     DOMErrorHandler*            fErrorHandler;
-    DOMBuilderFilter*           fFilter;
+    DOMLSParserFilter*          fFilter;
     bool                        fCharsetOverridesXMLEncoding;
     bool                        fUserAdoptsDocument;
 
     // -----------------------------------------------------------------------
     // Unimplemented constructors and operators
     // -----------------------------------------------------------------------
-    DOMBuilderImpl(const DOMBuilderImpl &);
-    DOMBuilderImpl & operator = (const DOMBuilderImpl &);
+    DOMLSParserImpl(const DOMLSParserImpl &);
+    DOMLSParserImpl & operator = (const DOMLSParserImpl &);
 };
 
 
 
 // ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Handlers for the XMLEntityHandler interface
+//  DOMLSParserImpl: Handlers for the XMLEntityHandler interface
 // ---------------------------------------------------------------------------
-inline void DOMBuilderImpl::endInputSource(const InputSource&)
+inline void DOMLSParserImpl::endInputSource(const InputSource&)
 {
     // The DOM entity resolver doesn't handle this
 }
 
-inline bool DOMBuilderImpl::expandSystemId(const XMLCh* const, XMLBuffer&)
+inline bool DOMLSParserImpl::expandSystemId(const XMLCh* const, XMLBuffer&)
 {
     // The DOM entity resolver doesn't handle this
     return false;
 }
 
-inline void DOMBuilderImpl::resetEntities()
+inline void DOMLSParserImpl::resetEntities()
 {
     // Nothing to do on this one
 }
 
-inline void DOMBuilderImpl::startInputSource(const InputSource&)
+inline void DOMLSParserImpl::startInputSource(const InputSource&)
 {
     // The DOM entity resolver doesn't handle this
 }
 
 
 // ---------------------------------------------------------------------------
-//  DOMBuilderImpl: Getter methods
+//  DOMLSParserImpl: Getter methods
 // ---------------------------------------------------------------------------
-inline DOMErrorHandler* DOMBuilderImpl::getErrorHandler()
-{
-    return fErrorHandler;
-}
-
-inline const DOMErrorHandler* DOMBuilderImpl::getErrorHandler() const
-{
-    return fErrorHandler;
-}
-
-inline DOMEntityResolver* DOMBuilderImpl::getEntityResolver()
+inline DOMConfiguration* DOMLSParserImpl::getDomConfig()
 {
-    return fEntityResolver;
+    return this;
 }
 
-inline const DOMEntityResolver* DOMBuilderImpl::getEntityResolver() const
+inline bool DOMLSParserImpl::getAsync() const
 {
-    return fEntityResolver;
-}
-
-inline XMLEntityResolver* DOMBuilderImpl::getXMLEntityResolver()
-{
-    return fXMLEntityResolver;
-}
-
-inline const XMLEntityResolver* DOMBuilderImpl::getXMLEntityResolver() const
-{
-    return fXMLEntityResolver;
-}
-
-inline DOMBuilderFilter* DOMBuilderImpl::getFilter()
-{
-    return fFilter;
+    // We are a synchronous parser
+    return false;
 }
 
-inline const DOMBuilderFilter* DOMBuilderImpl::getFilter() const
+inline const DOMLSParserFilter* DOMLSParserImpl::getFilter() const
 {
     return fFilter;
 }

Modified: xerces/c/trunk/src/xercesc/util/XMLUni.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/util/XMLUni.cpp?rev=224543&r1=224542&r2=224543&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLUni.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLUni.cpp Sat Jul 23 14:11:41 2005
@@ -1128,8 +1128,8 @@
     ,   chLatin_i, chLatin_o, chLatin_n, chLatin_s, chNull
 };
 
-const XMLCh XMLUni::fgXercesValidateAnnotations[] =
 //Xerces: http://apache.org/xml/features/validate-annotations
+const XMLCh XMLUni::fgXercesValidateAnnotations[] =
 {
         chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash
     ,   chForwardSlash, chLatin_a, chLatin_p, chLatin_a, chLatin_c, chLatin_h
@@ -1221,6 +1221,19 @@
     ,   chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
 };
 
+//Property
+//Xerces: http://apache.org/xml/properties/entity-resolver
+const XMLCh XMLUni::fgXercesEntityResolver[] =
+{
+        chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash
+    ,   chForwardSlash, chLatin_a, chLatin_p, chLatin_a, chLatin_c, chLatin_h
+    ,   chLatin_e, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash
+    ,   chLatin_x, chLatin_m, chLatin_l, chForwardSlash, chLatin_p, chLatin_a
+    ,   chLatin_r, chLatin_s, chLatin_e, chLatin_r, chDash, chLatin_e, chLatin_n
+    ,   chLatin_t, chLatin_i, chLatin_t, chLatin_y, chDash, chLatin_r, chLatin_e
+    ,   chLatin_s, chLatin_o, chLatin_l, chLatin_v, chLatin_e, chLatin_r, chNull
+};
+
 
 //Xerces: http://apache.org/xml/features/dom/user-adopts-DOMDocument
 const XMLCh XMLUni::fgXercesUserAdoptsDOMDocument[] =
@@ -1360,6 +1373,15 @@
     ,   chLatin_n, chLatin_g, chNull
 };
 
+const XMLCh XMLUni::fgDOMCheckCharacterNormalization[] = 
+{
+        chLatin_c, chLatin_h, chLatin_e, chLatin_c, chLatin_k, chDash
+    ,   chLatin_c, chLatin_h, chLatin_a, chLatin_r, chLatin_a, chLatin_c, chLatin_t
+    ,   chLatin_e, chLatin_r, chDash, chLatin_n, chLatin_o, chLatin_r, chLatin_m
+    ,   chLatin_a, chLatin_l, chLatin_i, chLatin_z, chLatin_a, chLatin_t, chLatin_i
+    ,   chLatin_o, chLatin_n, chNull
+};
+
 const XMLCh XMLUni::fgDOMDatatypeNormalization[] =
 {
         chLatin_d, chLatin_a, chLatin_t, chLatin_a, chLatin_t, chLatin_y, chLatin_p
@@ -1368,17 +1390,48 @@
     ,   chLatin_n, chNull
 };
 
+const XMLCh XMLUni::fgDOMDisallowDoctype[] =
+{
+        chLatin_d, chLatin_i, chLatin_s, chLatin_a, chLatin_l, chLatin_l, chLatin_o
+    ,   chLatin_w, chDash, chLatin_d, chLatin_o, chLatin_c, chLatin_t, chLatin_y
+    ,   chLatin_e, chNull
+};
+
+const XMLCh XMLUni::fgDOMElementContentWhitespace[] = 
+{
+        chLatin_e, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t
+    ,   chDash, chLatin_c, chLatin_o, chLatin_n, chLatin_t, chLatin_e, chLatin_n
+    ,   chLatin_t, chDash, chLatin_w, chLatin_h, chLatin_i, chLatin_t, chLatin_e
+    ,   chLatin_s, chLatin_p, chLatin_a, chLatin_c, chLatin_e, chNull
+};
+
 const XMLCh XMLUni::fgDOMEntities[] =
 {
         chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_i, chLatin_e
     ,   chLatin_s, chNull
 };
 
+const XMLCh XMLUni::fgDOMErrorHandler[] = 
+{
+        chLatin_e, chLatin_r, chLatin_r, chLatin_o, chLatin_r, chDash, chLatin_h
+    ,   chLatin_a, chLatin_n, chLatin_d, chLatin_l, chLatin_e, chLatin_r, chNull
+};
+
 const XMLCh XMLUni::fgDOMInfoset[] =
 {
         chLatin_i, chLatin_n, chLatin_f, chLatin_o, chLatin_s, chLatin_e, chLatin_t, chNull
 };
 
+const XMLCh XMLUni::fgDOMIgnoreUnknownCharacterDenormalization[] = 
+{
+        chLatin_i, chLatin_g, chLatin_n, chLatin_o, chLatin_r, chLatin_e, chDash
+    ,   chLatin_u, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n
+    ,   chDash, chLatin_c, chLatin_h, chLatin_a, chLatin_r, chLatin_a, chLatin_c
+    ,   chLatin_t, chLatin_e, chLatin_r, chDash, chLatin_d, chLatin_e, chLatin_n 
+    ,   chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_l, chLatin_i, chLatin_z
+    ,   chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
+};
+
 const XMLCh XMLUni::fgDOMNamespaces[] =
 {
         chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chLatin_p, chLatin_a
@@ -1393,14 +1446,54 @@
     ,   chLatin_s, chNull
 };
 
+const XMLCh XMLUni::fgDOMNormalizeCharacters[] = 
+{
+        chLatin_n, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_l, chLatin_i 
+    ,   chLatin_z, chLatin_e, chDash, chLatin_c, chLatin_h, chLatin_a, chLatin_r
+    ,   chLatin_a, chLatin_c, chLatin_t, chLatin_e, chLatin_r, chLatin_s, chNull
+};
+
+const XMLCh XMLUni::fgDOMResourceResolver[] = 
+{
+        chLatin_r, chLatin_e, chLatin_s, chLatin_o, chLatin_u, chLatin_r, chLatin_c
+    ,   chLatin_e, chDash, chLatin_r, chLatin_e, chLatin_s, chLatin_o, chLatin_l 
+    ,   chLatin_v, chLatin_e, chLatin_r, chNull
+};
+
+const XMLCh XMLUni::fgDOMSchemaLocation[] = 
+{
+        chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chDash
+    ,   chLatin_l, chLatin_o, chLatin_c, chLatin_a, chLatin_t, chLatin_i, chLatin_o
+    ,   chLatin_n, chNull
+};
+
+const XMLCh XMLUni::fgDOMSchemaType[] = 
+{
+        chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chDash
+    ,   chLatin_t, chLatin_y, chLatin_p, chLatin_e, chNull
+};
+
+const XMLCh XMLUni::fgDOMSplitCDATASections[] = 
+{
+        chLatin_s, chLatin_p, chLatin_l, chLatin_i, chLatin_t, chDash, chLatin_c
+    ,   chLatin_d, chLatin_a, chLatin_t, chLatin_a, chDash, chLatin_s, chLatin_e
+    ,   chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chLatin_s, chNull
+};
+
 const XMLCh XMLUni::fgDOMSupportedMediatypesOnly[] =
 {
         chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t
     ,   chLatin_e, chLatin_d, chDash, chLatin_m, chLatin_e, chLatin_d, chLatin_i
-    ,   chLatin_a, chLatin_t, chLatin_y, chLatin_p, chLatin_e, chLatin_s, chDash
+    ,   chLatin_a, chDash, chLatin_t, chLatin_y, chLatin_p, chLatin_e, chLatin_s, chDash
     ,   chLatin_o, chLatin_n, chLatin_l, chLatin_y, chNull
 };
 
+const XMLCh XMLUni::fgDOMValidate[] =
+{
+        chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, chLatin_a, chLatin_t
+    ,   chLatin_e, chNull
+};
+
 const XMLCh XMLUni::fgDOMValidateIfSchema[] =
 {
         chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, chLatin_a, chLatin_t
@@ -1408,19 +1501,31 @@
     ,   chLatin_h, chLatin_e, chLatin_m, chLatin_a, chNull
 };
 
-const XMLCh XMLUni::fgDOMValidation[] =
+const XMLCh XMLUni::fgDOMWellFormed[] =
 {
-        chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, chLatin_a, chLatin_t
-    ,   chLatin_i, chLatin_o, chLatin_n, chNull
+        chLatin_w, chLatin_e, chLatin_l, chLatin_l, chDash, chLatin_f, chLatin_o
+    ,   chLatin_r, chLatin_m, chLatin_e, chLatin_d, chNull
+};
+
+
+
+const XMLCh XMLUni::fgDOMXMLSchemaType[] = 
+{
+        chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash
+    ,   chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w
+    ,   chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash
+    ,   chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash, chLatin_X
+    ,   chLatin_M, chLatin_L, chLatin_S, chLatin_c, chLatin_h, chLatin_e
+    ,   chLatin_m, chLatin_a, chNull
 };
 
-const XMLCh XMLUni::fgDOMWhitespaceInElementContent[] =
+const XMLCh XMLUni::fgDOMDTDType[] =
 {
-        chLatin_w, chLatin_h, chLatin_i, chLatin_t, chLatin_e, chLatin_s, chLatin_p
-    ,   chLatin_a, chLatin_c, chLatin_e, chDash, chLatin_i, chLatin_n, chDash
-    ,   chLatin_e, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t
-    ,   chDash, chLatin_c, chLatin_o, chLatin_n, chLatin_t, chLatin_e, chLatin_n
-    ,   chLatin_t, chNull
+        chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash
+    ,   chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w
+    ,   chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash
+    ,   chLatin_T, chLatin_R, chForwardSlash, chLatin_R, chLatin_E, chLatin_C 
+    ,   chDash, chLatin_x, chLatin_m, chLatin_l, chNull
 };
 
 //Introduced in DOM Level 3

Modified: xerces/c/trunk/src/xercesc/util/XMLUni.hpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/util/XMLUni.hpp?rev=224543&r1=224542&r2=224543&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLUni.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLUni.hpp Sat Jul 23 14:11:41 2005
@@ -229,7 +229,7 @@
     static const XMLCh fgXercesIgnoreAnnotations[];
     static const XMLCh fgXercesDisableDefaultEntityResolution[];
     static const XMLCh fgXercesSkipDTDValidation[];
-
+    static const XMLCh fgXercesEntityResolver[];
 
     // SAX2 features/properties names
     static const XMLCh fgSAX2CoreValidation[];
@@ -237,23 +237,36 @@
     static const XMLCh fgSAX2CoreNameSpacePrefixes[];
 
     // Introduced in DOM Level 3
-    // DOMBuilder features
+    // DOMLSParser features
     static const XMLCh fgDOMCanonicalForm[];
     static const XMLCh fgDOMCDATASections[];
     static const XMLCh fgDOMComments[];
     static const XMLCh fgDOMCharsetOverridesXMLEncoding[];
+    static const XMLCh fgDOMCheckCharacterNormalization[];
     static const XMLCh fgDOMDatatypeNormalization[];
+    static const XMLCh fgDOMDisallowDoctype[];
+    static const XMLCh fgDOMElementContentWhitespace[];
+    static const XMLCh fgDOMErrorHandler[];
     static const XMLCh fgDOMEntities[];
+    static const XMLCh fgDOMIgnoreUnknownCharacterDenormalization[];
     static const XMLCh fgDOMInfoset[];
     static const XMLCh fgDOMNamespaces[];
     static const XMLCh fgDOMNamespaceDeclarations[];
+    static const XMLCh fgDOMNormalizeCharacters[];
+    static const XMLCh fgDOMResourceResolver[];
+    static const XMLCh fgDOMSchemaLocation[];
+    static const XMLCh fgDOMSchemaType[];
+    static const XMLCh fgDOMSplitCDATASections[];
     static const XMLCh fgDOMSupportedMediatypesOnly[];
+    static const XMLCh fgDOMValidate[];
     static const XMLCh fgDOMValidateIfSchema[];
-    static const XMLCh fgDOMValidation[];
-    static const XMLCh fgDOMWhitespaceInElementContent[];
+    static const XMLCh fgDOMWellFormed[];
+
+    static const XMLCh fgDOMXMLSchemaType[];
+    static const XMLCh fgDOMDTDType[];
 
     // Introduced in DOM Level 3
-    // DOMWriter feature
+    // DOMLSSerializer feature
     static const XMLCh fgDOMWRTCanonicalForm[];
     static const XMLCh fgDOMWRTDiscardDefaultContent[];
     static const XMLCh fgDOMWRTEntities[];

Modified: xerces/c/trunk/tests/src/DOM/Normalizer/Normalizer.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/tests/src/DOM/Normalizer/Normalizer.cpp?rev=224543&r1=224542&r2=224543&view=diff
==============================================================================
--- xerces/c/trunk/tests/src/DOM/Normalizer/Normalizer.cpp (original)
+++ xerces/c/trunk/tests/src/DOM/Normalizer/Normalizer.cpp Sat Jul 23 14:11:41 2005
@@ -205,12 +205,12 @@
     XMLCh tempStr[100];
     XMLString::transcode("LS", tempStr, 99);
     DOMImplementation *impl          = DOMImplementationRegistry::getDOMImplementation(tempStr);
-    DOMWriter         *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
-    theSerializer->setFeature(X("format-pretty-print"), true);
+    DOMLSSerializer   *theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer();
+    theSerializer->getDomConfig()->setParameter(X("format-pretty-print"), true);
     XMLFormatTarget *myFormTarget;
     myFormTarget = new StdOutFormatTarget();
 
-    theSerializer->writeNode(myFormTarget, *node);
+    theSerializer->write(node,myFormTarget);
 }
 
 int main(int argc, char **argv) {
@@ -373,7 +373,7 @@
     DOMConfigurationImpl *cImpl = new ((DOMDocumentImpl*)doc) DOMConfigurationImpl();
     ((DOMDocumentImpl*)doc)->setDOMConfiguration(cImpl);
     cImpl->setErrorHandler(normalizer);
-    cImpl->setParameter(X("namespaces"), (void*)tmpTrue);
+    cImpl->setParameter(X("namespaces"), true);
 
     DOMElement *level1Node = doc->createElement(X("level1Node"));
     docFirstElement->appendChild(level1Node);
@@ -396,7 +396,7 @@
     doc->normalizeDocument();
     normalizer->serializeNode(doc);
 
-    cImpl->setParameter(X("comments"), (void*)tmpFalse);
+    cImpl->setParameter(X("comments"), false);
     docFirstElement->appendChild(comment);
     doc->normalizeDocument();
     normalizer->serializeNode(doc);
@@ -408,7 +408,7 @@
     doc->normalizeDocument();
     normalizer->serializeNode(doc);
 
-    cImpl->setParameter(X("cdata-sections"), (void*)tmpFalse);
+    cImpl->setParameter(X("cdata-sections"), false);
     docFirstElement->appendChild(cData);
     doc->normalizeDocument();
     normalizer->serializeNode(doc);

Modified: xerces/c/trunk/tests/src/MemHandlerTest/MemoryMonitor.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/tests/src/MemHandlerTest/MemoryMonitor.cpp?rev=224543&r1=224542&r2=224543&view=diff
==============================================================================
--- xerces/c/trunk/tests/src/MemHandlerTest/MemoryMonitor.cpp (original)
+++ xerces/c/trunk/tests/src/MemHandlerTest/MemoryMonitor.cpp Sat Jul 23 14:11:41 2005
@@ -67,7 +67,7 @@
 {
     XERCES_STD_QUALIFIER cout << "\nUsage:\n"
             "    MemHandlerTest [options] <XML file | List file>\n\n"
-            "This program invokes the XercesDOMParser, DOMBuilder, SAXParser ,\n"
+            "This program invokes the XercesDOMParser, DOMLSParser, SAXParser ,\n"
             "and the SAX2XMLReader, and ensures that MemoryManagers set on these\n"
             "domBuilders are called to delete just as many bytes as they allocate.\n"
             "This is done for each XML file, and each file is processed\n"
@@ -85,11 +85,11 @@
          << XERCES_STD_QUALIFIER endl;
 }
 
-class DOMBuilderHandler : public DOMErrorHandler 
+class DOMLSParserHandler : public DOMErrorHandler 
 {
 public:
-    DOMBuilderHandler() {};
-    ~DOMBuilderHandler() {};
+    DOMLSParserHandler() {};
+    ~DOMLSParserHandler() {};
     bool handleError(const DOMError &error) 
     {
         char *message = 0;
@@ -255,9 +255,9 @@
     MemoryMonitor *domBuilderMemMonitor = new MemoryMonitor();
     static const XMLCh gLS[] = { chLatin_L, chLatin_S, chNull };
     DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(gLS);
-    DOMBuilder        *domBuilder = ((DOMImplementationLS*)impl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0, domBuilderMemMonitor);
-    DOMBuilderHandler domBuilderHandler;
-    domBuilder->setErrorHandler(&domBuilderHandler);
+    DOMLSParser       *domBuilder = ((DOMImplementationLS*)impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0, domBuilderMemMonitor);
+    DOMLSParserHandler domBuilderHandler;
+    domBuilder->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, &domBuilderHandler);
 
     // Instantiate the SAX2 domBuilder with its memory manager.
     MemoryMonitor *sax2MemMonitor = new MemoryMonitor();
@@ -276,24 +276,24 @@
     saxParser->setErrorHandler(&saxErrorHandler);
 
     // set features 
-    domBuilder->setFeature(XMLUni::fgDOMNamespaces, doNamespaces);
+    domBuilder->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, doNamespaces);
     sax2parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, doNamespaces);
     depDOMParser->setDoNamespaces(doNamespaces);
     saxParser->setDoNamespaces(doNamespaces);
 
-    domBuilder->setFeature(XMLUni::fgXercesSchema, doSchema);
+    domBuilder->getDomConfig()->setParameter(XMLUni::fgXercesSchema, doSchema);
     sax2parser->setFeature(XMLUni::fgXercesSchema, doSchema);
     depDOMParser->setDoSchema(doSchema);
     saxParser->setDoSchema(doSchema);
 
-    domBuilder->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking);
+    domBuilder->getDomConfig()->setParameter(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking);
     sax2parser->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking);
     depDOMParser->setValidationSchemaFullChecking(schemaFullChecking);
     saxParser->setValidationSchemaFullChecking(schemaFullChecking);
 
     if (domBuilderValScheme == AbstractDOMParser::Val_Auto)
     {
-        domBuilder->setFeature(XMLUni::fgDOMValidateIfSchema, true);
+        domBuilder->getDomConfig()->setParameter(XMLUni::fgDOMValidateIfSchema, true);
         sax2parser->setFeature(XMLUni::fgSAX2CoreValidation, true);
         sax2parser->setFeature(XMLUni::fgXercesDynamic, true);
         depDOMParser->setValidationScheme(DOMParser::Val_Auto);
@@ -301,14 +301,14 @@
     }
     else if (domBuilderValScheme == AbstractDOMParser::Val_Never)
     {
-        domBuilder->setFeature(XMLUni::fgDOMValidation, false);
+        domBuilder->getDomConfig()->setParameter(XMLUni::fgDOMValidate, false);
         sax2parser->setFeature(XMLUni::fgSAX2CoreValidation, false);
         depDOMParser->setValidationScheme(DOMParser::Val_Never);
         saxParser->setValidationScheme(SAXParser::Val_Never);
     }
     else if (domBuilderValScheme == AbstractDOMParser::Val_Always)
     {
-        domBuilder->setFeature(XMLUni::fgDOMValidation, true);
+        domBuilder->getDomConfig()->setParameter(XMLUni::fgDOMValidate, true);
         sax2parser->setFeature(XMLUni::fgSAX2CoreValidation, true);
         sax2parser->setFeature(XMLUni::fgXercesDynamic, false);
         depDOMParser->setValidationScheme(DOMParser::Val_Always);
@@ -316,7 +316,7 @@
     }
 
     // enable datatype normalization - default is off
-    domBuilder->setFeature(XMLUni::fgDOMDatatypeNormalization, true);
+    domBuilder->getDomConfig()->setParameter(XMLUni::fgDOMDatatypeNormalization, true);
 
     XERCES_STD_QUALIFIER ifstream fin;
     bool more = true;

Modified: xerces/c/trunk/tests/src/MemHandlerTest/MemoryMonitor.hpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/tests/src/MemHandlerTest/MemoryMonitor.hpp?rev=224543&r1=224542&r2=224543&view=diff
==============================================================================
--- xerces/c/trunk/tests/src/MemHandlerTest/MemoryMonitor.hpp (original)
+++ xerces/c/trunk/tests/src/MemHandlerTest/MemoryMonitor.hpp Sat Jul 23 14:11:41 2005
@@ -22,7 +22,7 @@
 #include <xercesc/framework/MemoryManager.hpp>
 #include <xercesc/util/PlatformUtils.hpp>
 #include "SimpleHashPtr.hpp"
-#include <xercesc/dom/DOMBuilder.hpp>
+#include <xercesc/dom/DOMLSParser.hpp>
 #include <xercesc/dom/DOMErrorHandler.hpp>
 #include <xercesc/dom/DOMError.hpp>
 #include <xercesc/dom/DOMImplementation.hpp>

Modified: xerces/c/trunk/tests/src/ThreadTest/ThreadTest.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/tests/src/ThreadTest/ThreadTest.cpp?rev=224543&r1=224542&r2=224543&view=diff
==============================================================================
--- xerces/c/trunk/tests/src/ThreadTest/ThreadTest.cpp (original)
+++ xerces/c/trunk/tests/src/ThreadTest/ThreadTest.cpp Sat Jul 23 14:11:41 2005
@@ -777,10 +777,10 @@
             XMLCh tempStr[100];
             XMLString::transcode("LS", tempStr, 99);
             DOMImplementation *impl          = DOMImplementationRegistry::getDOMImplementation(tempStr);
-            DOMWriter         *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
+            DOMLSSerializer   *theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer();
             XMLFormatTarget   *myFormTarget  = new StdOutFormatTarget();
             DOMNode           *doc           = fXercesDOMParser->getDocument();
-            theSerializer->writeNode(myFormTarget, *doc);
+            theSerializer->write(doc,myFormTarget);
             delete theSerializer;
         }
         catch (...)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org