You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2004/03/13 01:44:56 UTC

cvs commit: xml-xalan/c/src/xalanc/XercesParserLiaison XercesDOMException.cpp XercesDOMException.hpp XercesParserLiaison.cpp XercesParserLiaison.hpp

dbertoni    2004/03/12 16:44:56

  Modified:    c/src/xalanc/TestXSLT process.cpp
               c/src/xalanc/XSLT StylesheetExecutionContext.hpp
                        StylesheetExecutionContextDefault.cpp
                        StylesheetExecutionContextDefault.hpp
               c/src/xalanc/XalanSourceTree
                        XalanSourceTreeParserLiaison.cpp
                        XalanSourceTreeParserLiaison.hpp
               c/src/xalanc/XalanTransformer
                        XalanDefaultDocumentBuilder.cpp
                        XercesDOMWrapperParsedSource.cpp
                        XercesDOMWrapperParsedSource.hpp
               c/src/xalanc/XercesParserLiaison XercesDOMException.cpp
                        XercesDOMException.hpp XercesParserLiaison.cpp
                        XercesParserLiaison.hpp
  Log:
  Changes necessary for removal of Xerces-C's deprecated DOM.
  
  Revision  Changes    Path
  1.9       +17 -9     xml-xalan/c/src/xalanc/TestXSLT/process.cpp
  
  Index: process.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/TestXSLT/process.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- process.cpp	26 Feb 2004 22:35:18 -0000	1.8
  +++ process.cpp	13 Mar 2004 00:44:55 -0000	1.9
  @@ -86,7 +86,6 @@
   
   
   
  -#include <xalanc/XMLSupport/FormatterToDOM.hpp>
   #include <xalanc/XMLSupport/FormatterToHTML.hpp>
   #include <xalanc/XMLSupport/FormatterToNull.hpp>
   #include <xalanc/XMLSupport/FormatterToText.hpp>
  @@ -95,6 +94,10 @@
   
   
   
  +#include <xalanc/XercesParserLiaison/FormatterToXercesDOM.hpp>
  +
  +
  +
   #include <xalanc/XalanSourceTree/FormatterToSourceTree.hpp>
   #include <xalanc/XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
   #include <xalanc/XalanSourceTree/XalanSourceTreeDocument.hpp>
  @@ -565,7 +568,7 @@
   			int								indentAmount,
   			const XalanDOMString&			mimeEncoding,
   			const StylesheetRoot*			stylesheet,
  -			XMLParserLiaison&				parserLiaison,
  +			XercesParserLiaison&		    parserLiaison,
   			XalanSourceTreeParserLiaison&	sourceTreeParserLiaison,
   			const PrefixResolver&			prefixResolver,
   			const XalanDocument*&			theResultDocument)
  @@ -673,18 +676,23 @@
   		}
   		else
   		{
  -			XalanDocument* const	theDocument =
  +			DOMDocument_Type* const     theDocument =
   				parserLiaison.createDOMFactory();
   			assert(theDocument != 0);
   
  -			theResultDocument = theDocument;
  -
  -			FormatterToDOM* const	fToDOM =
  -				new FormatterToDOM(theDocument, 0);
  +			FormatterToXercesDOM* const     fToDOM =
  +				new FormatterToXercesDOM(theDocument, 0);
   
   			fToDOM->setPrefixResolver(&prefixResolver);
   
   			formatter = fToDOM;
  +
  +            theResultDocument =
  +                parserLiaison.createDocument(
  +                    theDocument,
  +                    false,
  +                    false,
  +                    false);
   		}
   	}
   
  @@ -929,7 +937,7 @@
   				xmlParserLiaison.getIndent(),
   				mimeEncoding,
   				stylesheet,
  -				xmlParserLiaison,
  +				theXercesParserLiaison,
   				theXalanSourceTreeParserLiaison,
   				processor,
   				theResultDocument));
  @@ -1033,7 +1041,7 @@
   						xmlParserLiaison.getIndent(),
   						mimeEncoding,
   						stylesheet,
  -						xmlParserLiaison,
  +						theXercesParserLiaison,
   						theXalanSourceTreeParserLiaison,
   						processor,
   						theResultDocument));
  
  
  
  1.16      +15 -10    xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContext.hpp
  
  Index: StylesheetExecutionContext.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContext.hpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- StylesheetExecutionContext.hpp	26 Feb 2004 22:58:58 -0000	1.15
  +++ StylesheetExecutionContext.hpp	13 Mar 2004 00:44:55 -0000	1.16
  @@ -287,14 +287,6 @@
   	setRootDocument(XalanNode*	theDocument) = 0;
   
   	/**
  -	 * Create a new empty document.
  -	 * 
  -	 * @return new document
  -	 */
  -	virtual XalanDocument*
  -	createDocument() const = 0;
  -
  -	/**
   	 * Set root stylesheet for stylesheet.
   	 * 
   	 * @param theStylesheet root stylesheet
  @@ -1901,9 +1893,22 @@
   			const XalanDOMString&	theURI,
   			XalanDocument*			theDocument) = 0;
   
  +	virtual void
  +    formatNumber(
  +			double					number,
  +			const XalanDOMString&	pattern,
  +			XalanDOMString&			theResult,
  +			const XalanNode*		context = 0,
  +			const LocatorType*		locator = 0) = 0;
   
  -	virtual const XalanDecimalFormatSymbols*
  -	getDecimalFormatSymbols(const XalanQName&	qname) = 0;
  +	virtual void
  +    formatNumber(
  +			double					number,
  +			const XalanDOMString&	pattern,
  +			const XalanDOMString&	dfsName,
  +			XalanDOMString&			theResult,
  +			const XalanNode*		context = 0,
  +			const LocatorType*		locator = 0) = 0;
   
   	// These interfaces are inherited from ExecutionContext...
   
  
  
  
  1.22      +2 -11     xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
  
  Index: StylesheetExecutionContextDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- StylesheetExecutionContextDefault.cpp	10 Mar 2004 21:15:47 -0000	1.21
  +++ StylesheetExecutionContextDefault.cpp	13 Mar 2004 00:44:55 -0000	1.22
  @@ -232,16 +232,6 @@
   
   
   
  -XalanDocument*
  -StylesheetExecutionContextDefault::createDocument() const
  -{
  -	assert(m_xsltProcessor != 0);
  -
  -	return m_xsltProcessor->getXMLParserLiaison().createDocument();
  -}
  -
  -
  -
   void
   StylesheetExecutionContextDefault::setStylesheetRoot(const StylesheetRoot*	theStylesheet)
   {
  @@ -1641,7 +1631,8 @@
   		warn(
   				XalanMessageLoader::getMessage(XalanMessages::Decimal_formatElementNotFound_1Param,"format-number()"),
   				context,
  -				locator);	
  +				locator);
  +
   		theDFS = getDecimalFormatSymbols(theEmptyQName);
   		
   	}
  
  
  
  1.17      +17 -20    xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp
  
  Index: StylesheetExecutionContextDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- StylesheetExecutionContextDefault.hpp	10 Mar 2004 21:15:47 -0000	1.16
  +++ StylesheetExecutionContextDefault.hpp	13 Mar 2004 00:44:55 -0000	1.17
  @@ -263,9 +263,6 @@
   	virtual void
   	setRootDocument(XalanNode*	theDocument);
   
  -	virtual XalanDocument*
  -	createDocument() const;
  -
   	virtual void
   	setStylesheetRoot(const StylesheetRoot*		theStylesheet);
   
  @@ -714,25 +711,25 @@
   			const XalanDecimalFormatSymbols*	theDFS,
   			XalanDOMString&						theResult,
   			const XalanNode*					context = 0,
  -			const LocatorType*					locator = 0) const =0;
  +			const LocatorType*					locator = 0) const = 0;
   	};
   
  -	void 
  +	virtual void
   	formatNumber(
  -			double								number,
  -			const XalanDOMString&				pattern,
  -			XalanDOMString&						theResult,
  -			const XalanNode*					context = 0,
  -			const LocatorType*					locator = 0);
  +			double					number,
  +			const XalanDOMString&	pattern,
  +			XalanDOMString&			theResult,
  +			const XalanNode*		context = 0,
  +			const LocatorType*		locator = 0);
   
  -	void 
  +	virtual void
   	formatNumber(
  -			double								number,
  -			const XalanDOMString&				pattern,
  -			const XalanDOMString&				dfsName,
  -			XalanDOMString&						theResult,
  -			const XalanNode*					context = 0,
  -			const LocatorType*					locator = 0);
  +			double					number,
  +			const XalanDOMString&	pattern,
  +			const XalanDOMString&	dfsName,
  +			XalanDOMString&			theResult,
  +			const XalanNode*		context = 0,
  +			const LocatorType*		locator = 0);
   
   
   	const FormatNumberFunctor * 
  @@ -978,10 +975,10 @@
   	virtual bool
   	returnFormatterToText(FormatterToText*	theFormatter);
   
  -	virtual const XalanDecimalFormatSymbols*
  -	getDecimalFormatSymbols(const XalanQName&	qname);
  -
   private:
  +
  +	const XalanDecimalFormatSymbols*
  +	getDecimalFormatSymbols(const XalanQName&	qname);
   
   	/**
   	 * Given a context, create the params for a template
  
  
  
  1.5       +16 -16    xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.cpp
  
  Index: XalanSourceTreeParserLiaison.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanSourceTreeParserLiaison.cpp	26 Feb 2004 23:03:38 -0000	1.4
  +++ XalanSourceTreeParserLiaison.cpp	13 Mar 2004 00:44:55 -0000	1.5
  @@ -545,22 +545,6 @@
   
   
   
  -XalanDocument*
  -XalanSourceTreeParserLiaison::createDocument()
  -{
  -	return createXalanSourceTreeDocument();
  -}
  -
  -
  -
  -XalanDocument*
  -XalanSourceTreeParserLiaison::createDOMFactory()
  -{
  -	return m_xercesParserLiaison.createDocument();
  -}
  -
  -
  -
   void
   XalanSourceTreeParserLiaison::destroyDocument(XalanDocument*	theDocument)
   {
  @@ -635,6 +619,22 @@
   	theReader->setLexicalHandler(theLexicalHandler);
   
   	theReader->parse(theInputSource);
  +}
  +
  +
  +
  +DOMDocument_Type*
  +XalanSourceTreeParserLiaison::createDOMFactory()
  +{
  +	return m_xercesParserLiaison.createDOMFactory();
  +}
  +
  +
  +
  +void
  +XalanSourceTreeParserLiaison::destroyDocument(DOMDocument_Type*     theDocument)
  +{
  +	m_xercesParserLiaison.destroyDocument(theDocument);
   }
   
   
  
  
  
  1.6       +6 -6      xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.hpp
  
  Index: XalanSourceTreeParserLiaison.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XalanSourceTreeParserLiaison.hpp	26 Feb 2004 23:03:38 -0000	1.5
  +++ XalanSourceTreeParserLiaison.hpp	13 Mar 2004 00:44:55 -0000	1.6
  @@ -122,12 +122,6 @@
   			DocumentHandlerType&	handler,
   			const XalanDOMString&	identifier = XalanDOMString());
   
  -	virtual XalanDocument*
  -	createDocument();
  -
  -	virtual XalanDocument*
  -	createDOMFactory();
  -
   	virtual void
   	destroyDocument(XalanDocument*	theDocument);
   
  @@ -171,6 +165,12 @@
   			DTDHandlerType*			theDTDHandler = 0,
   			LexicalHandlerType*		theLexicalHandler = 0,
   			const XalanDOMString&	theIdentifier = XalanDOMString());
  +
  +	virtual DOMDocument_Type*
  +	createDOMFactory();
  +
  +	virtual void
  +	destroyDocument(DOMDocument_Type*   theDocument);
   
   	/** Get the 'include ignorable whitespace' flag.
   	  *
  
  
  
  1.5       +1 -1      xml-xalan/c/src/xalanc/XalanTransformer/XalanDefaultDocumentBuilder.cpp
  
  Index: XalanDefaultDocumentBuilder.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanTransformer/XalanDefaultDocumentBuilder.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanDefaultDocumentBuilder.cpp	26 Feb 2004 23:07:13 -0000	1.4
  +++ XalanDefaultDocumentBuilder.cpp	13 Mar 2004 00:44:55 -0000	1.5
  @@ -33,7 +33,7 @@
   XalanDefaultDocumentBuilder::XalanDefaultDocumentBuilder(const XalanDOMString&	theURI) :
   	m_domSupport(),
   	m_parserLiaison(),
  -	m_contentHandler(m_parserLiaison.mapDocument(m_parserLiaison.createDocument())),
  +	m_contentHandler(m_parserLiaison.createXalanSourceTreeDocument()),
   	m_uri(theURI)
   {
   	m_domSupport.setParserLiaison(&m_parserLiaison);
  
  
  
  1.6       +2 -0      xml-xalan/c/src/xalanc/XalanTransformer/XercesDOMWrapperParsedSource.cpp
  
  Index: XercesDOMWrapperParsedSource.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanTransformer/XercesDOMWrapperParsedSource.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XercesDOMWrapperParsedSource.cpp	26 Feb 2004 23:07:13 -0000	1.5
  +++ XercesDOMWrapperParsedSource.cpp	13 Mar 2004 00:44:56 -0000	1.6
  @@ -38,6 +38,7 @@
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   XercesDOMWrapperParsedSource::XercesDOMWrapperParsedSource(
   			const DOM_Document_Type&	theDocument,
   			XercesParserLiaison&		theParserLiaison,
  @@ -51,6 +52,7 @@
   {
   	assert(m_parsedSource != 0);
   }
  +#endif
   
   
   
  
  
  
  1.5       +2 -0      xml-xalan/c/src/xalanc/XalanTransformer/XercesDOMWrapperParsedSource.hpp
  
  Index: XercesDOMWrapperParsedSource.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanTransformer/XercesDOMWrapperParsedSource.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XercesDOMWrapperParsedSource.hpp	26 Feb 2004 23:07:13 -0000	1.4
  +++ XercesDOMWrapperParsedSource.hpp	13 Mar 2004 00:44:56 -0000	1.5
  @@ -58,6 +58,7 @@
   {
   public:
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   	/**
   	 * Constructor
   	 *
  @@ -73,6 +74,7 @@
   			XercesParserLiaison&		theParserLiaison,
   			XercesDOMSupport&			theDOMSupport,
   			const XalanDOMString&		theURI = XalanDOMString());
  +#endif
   
   	/**
   	 * Constructor
  
  
  
  1.7       +2 -0      xml-xalan/c/src/xalanc/XercesParserLiaison/XercesDOMException.cpp
  
  Index: XercesDOMException.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XercesParserLiaison/XercesDOMException.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XercesDOMException.cpp	26 Feb 2004 23:07:14 -0000	1.6
  +++ XercesDOMException.cpp	13 Mar 2004 00:44:56 -0000	1.7
  @@ -115,10 +115,12 @@
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   XercesDOMException::XercesDOMException(const DOM_DOMExceptionType&	theException) :
   	XalanDOMException(translateErrorCode(theException))
   {
   }
  +#endif
   
   
   
  
  
  
  1.7       +5 -1      xml-xalan/c/src/xalanc/XercesParserLiaison/XercesDOMException.hpp
  
  Index: XercesDOMException.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XercesParserLiaison/XercesDOMException.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XercesDOMException.hpp	26 Feb 2004 23:07:14 -0000	1.6
  +++ XercesDOMException.hpp	13 Mar 2004 00:44:56 -0000	1.7
  @@ -35,7 +35,9 @@
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   #include <xalanc/XercesParserLiaison/Deprecated/XercesBridgeTypes.hpp>
  +#endif
   #include <xalanc/XercesParserLiaison/XercesWrapperTypes.hpp>
   
   
  @@ -59,8 +61,9 @@
   	explicit
   	XercesDOMException(ExceptionCode 	code = UNKNOWN_ERR);
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   	/**
  -	  * This API is deprecated.
  +	  * This constructor is deprecated.
   	  * 
   	  * Constructor which takes a Xerces exception and
   	  * translates it into a XercesDOMException.
  @@ -69,6 +72,7 @@
   	  * @param code The Xerces DOM_DOMException instance.
   	  */
   	XercesDOMException(const DOM_DOMExceptionType&	theException);
  +#endif
   
   #if XERCES_VERSION_MAJOR >= 2
   	/**
  
  
  
  1.8       +46 -24    xml-xalan/c/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp
  
  Index: XercesParserLiaison.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XercesParserLiaison.cpp	26 Feb 2004 23:07:14 -0000	1.7
  +++ XercesParserLiaison.cpp	13 Mar 2004 00:44:56 -0000	1.8
  @@ -25,6 +25,7 @@
   
   
   
  +#include <xercesc/dom/DOMImplementation.hpp>
   #include <xercesc/framework/URLInputSource.hpp>
   #if XERCES_VERSION_MAJOR >= 2
   #include <xercesc/parsers/XercesDOMParser.hpp>
  @@ -51,7 +52,9 @@
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   #include <xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.hpp>
  +#endif
   #include <xalanc/XercesParserLiaison/XercesDocumentWrapper.hpp>
   #include <xalanc/XercesParserLiaison/XercesDOMSupport.hpp>
   
  @@ -117,8 +120,8 @@
   		i != m_documentMap.end();
   		++i)
   	{
  -		if ((*i).second.m_isDeprecated == false &&
  -			(*i).second.m_isOwned == true)
  +		if ((*i).second.isDeprecated() == false &&
  +			(*i).second.isOwned() == true)
   		{
   #if defined(XALAN_CANNOT_DELETE_CONST)
   			delete (DOMDocument_Type*)(*i).second.m_wrapper->getXercesDocument();
  @@ -233,25 +236,6 @@
   
   
   
  -XalanDocument*
  -XercesParserLiaison::createDocument()
  -{
  -	const DOM_Document_Type	theXercesDocument =
  -		DOM_Document_Type::createDocument();
  -
  -	return createDocument(theXercesDocument, false, false);
  -}
  -
  -
  -
  -XalanDocument*
  -XercesParserLiaison::createDOMFactory()
  -{
  -	return createDocument();
  -}
  -
  -
  -
   void
   XercesParserLiaison::destroyDocument(XalanDocument* 	theDocument)
   {
  @@ -307,6 +291,36 @@
   }
   
   
  +DOMDocument_Type*
  +XercesParserLiaison::createDOMFactory()
  +{
  +    DOMDocument_Type* const     theXercesDocument =
  +        DOMImplementationType::getImplementation()->createDocument();
  +
  +	createDocument(theXercesDocument, false, false);
  +	
  +    return theXercesDocument;
  +}
  +
  +
  +
  +void
  +XercesParserLiaison::destroyDocument(DOMDocument_Type*  theDocument)
  +{
  +	// Delete any live documents...
  +	for(DocumentMapType::iterator i = m_documentMap.begin();
  +		i != m_documentMap.end();
  +		++i)
  +	{
  +		if ((*i).second.isDeprecated() == false &&
  +			(*i).second.m_wrapper->getXercesDocument() == theDocument)
  +		{
  +            destroyDocument((XalanDocument*)(*i).first);
  +		}
  +	}
  +}
  +
  +
   
   bool
   XercesParserLiaison::getIncludeIgnorableWhitespace() const
  @@ -434,6 +448,7 @@
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   XalanDocument*
   XercesParserLiaison::createDocument(
   			const DOM_Document_Type& 	theXercesDocument,
  @@ -442,6 +457,7 @@
   {
   	return doCreateDocument(theXercesDocument, threadSafe, buildBridge);
   }
  +#endif
   
   
   
  @@ -459,6 +475,7 @@
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   XercesDocumentBridge*
   XercesParserLiaison::mapDocument(const XalanDocument*	theDocument) const
   {
  @@ -467,6 +484,7 @@
   
   	return i != m_documentMap.end() ? (*i).second.m_isDeprecated == true ? (*i).second.m_bridge : 0 : 0;
   }
  +#endif
   
   
   
  @@ -476,19 +494,21 @@
   	const DocumentMapType::const_iterator	i =
   		m_documentMap.find(theDocument);
   
  -	return i != m_documentMap.end() ? (*i).second.m_isDeprecated == false ? (*i).second.m_wrapper : 0 : 0;
  +	return i != m_documentMap.end() ? (*i).second.isDeprecated() == false ? (*i).second.m_wrapper : 0 : 0;
   }
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   DOM_Document_Type
   XercesParserLiaison::mapXercesDocument(const XalanDocument* 	theDocument) const
   {
   	const DocumentMapType::const_iterator	i =
   		m_documentMap.find(theDocument);
   
  -	return i != m_documentMap.end() ? (*i).second.m_isDeprecated == true ? (*i).second.m_bridge->getXercesDocument() : DOM_Document_Type() : DOM_Document_Type();
  +	return i != m_documentMap.end() ? (*i).second.isDeprecated() == true ? (*i).second.m_bridge->getXercesDocument() : DOM_Document_Type() : DOM_Document_Type();
   }
  +#endif
   
   
   
  @@ -498,7 +518,7 @@
   	const DocumentMapType::const_iterator	i =
   		m_documentMap.find(theDocument);
   
  -	return i != m_documentMap.end() ? (*i).second.m_isDeprecated == false ? (*i).second.m_wrapper->getXercesDocument() : 0 : 0;
  +	return i != m_documentMap.end() ? (*i).second.isDeprecated() == false ? (*i).second.m_wrapper->getXercesDocument() : 0 : 0;
   }
   
   
  @@ -683,6 +703,7 @@
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   XercesDocumentBridge*
   XercesParserLiaison::doCreateDocument(
   			const DOM_Document_Type& 	theXercesDocument,
  @@ -696,6 +717,7 @@
   
   	return theNewDocument;
   }
  +#endif
   
   
   
  
  
  
  1.7       +71 -13    xml-xalan/c/src/xalanc/XercesParserLiaison/XercesParserLiaison.hpp
  
  Index: XercesParserLiaison.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XercesParserLiaison/XercesParserLiaison.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XercesParserLiaison.hpp	26 Feb 2004 23:07:14 -0000	1.6
  +++ XercesParserLiaison.hpp	13 Mar 2004 00:44:56 -0000	1.7
  @@ -37,7 +37,9 @@
   
   
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   #include <xalanc/XercesParserLiaison/Deprecated/XercesBridgeTypes.hpp>
  +#endif
   #include <xalanc/XercesParserLiaison/XercesWrapperTypes.hpp>
   
   
  @@ -55,11 +57,12 @@
   
   
   
  -class DOMSupport;
   class XercesDOMSupport;
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   class XercesDocumentBridge;
  +#endif
   class XercesDocumentWrapper;
  -class XSLProcessor;
  +
   
   typedef XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException	SAXParseExceptionType;
   
  @@ -111,14 +114,6 @@
   			DocumentHandlerType&	handler,
   			const XalanDOMString&	identifier = XalanDOMString());
   
  -	// Create a non-thread safe document, with no synchronization and no bridge...
  -	virtual XalanDocument*
  -	createDocument();
  -
  -	// Create a non-thread safe document, with no synchronization and no bridge...
  -	virtual XalanDocument*
  -	createDOMFactory();
  -
   	virtual void
   	destroyDocument(XalanDocument*	theDocument);
   
  @@ -146,6 +141,26 @@
   
   	// These interfaces are new to XercesParserLiaison...
   
  +	/**
  +	  * Create an instance of the Xerces default document that
  +	  * is suitable as a raw document.  The new document instance
  +      * is owned by this instance and will be destroyed when this
  +      * instance goes out of scope, or by an explicit call to
  +      * destroyDocument()
  +	  *
  +	  * @return a pointer to the new instance
  +	  */
  +	virtual DOMDocument_Type*
  +	createDOMFactory();
  +
  +	/**
  +	  * Destroy an instance created by a call to createDOMFactory().
  +	  *
  +	  * @theDocument a pointer to the instance to be destroyed
  +	  */
  +	virtual void
  +	destroyDocument(DOMDocument_Type*   theDocument);
  +
   	/** Get the 'include ignorable whitespace' flag.
   	  *
   	  * This method returns the state of the parser's include ignorable
  @@ -297,6 +312,7 @@
   	virtual void
   	setExternalNoNamespaceSchemaLocation(const XalanDOMChar*	location);
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   	/**
   	 * This API is deprecated.
   	 *
  @@ -334,6 +350,7 @@
   			const DOM_Document_Type& 	theXercesDocument,
   			bool						threadSafe,
   			bool						buildBridge);
  +#endif
   
   	/**
   	 * Create a XalanDocument proxy for an existing Xerces document.
  @@ -357,7 +374,7 @@
   	 * liaison is destroyed.
   	 *
   	 * @param theXercesDocument The Xerces document.
  -	 * @param threadSafe If true, read access to the tree will be thread-safe (implies buildBridge == true).
  +	 * @param threadSafe If true, read access to the tree will be thread-safe (implies buildWrapper == true).
   	 * @param buildWrapper If true, the entire wrapper structure is built.
   	 * @param buildMaps If true, the map of Xerces to Xalan nodes is always built.
   	 * @return a pointer to a new XalanDocument-derived instance.
  @@ -369,6 +386,7 @@
   			bool						buildWrapper,
   			bool						buildMaps = false);
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   	/**
   	 * This API is deprecated.
   	 *
  @@ -383,6 +401,7 @@
   	 */
   	XercesDocumentBridge*
   	mapDocument(const XalanDocument*	theDocument) const;
  +#endif
   
   	/**
   	 * Map a pointer to a XalanDocument instance to its implementation
  @@ -396,6 +415,7 @@
   	XercesDocumentWrapper*
   	mapDocumentToWrapper(const XalanDocument*	theDocument) const;
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   	/** 
   	 * This API is deprecated.
   	 *
  @@ -410,6 +430,7 @@
   	 */
   	DOM_Document_Type
   	mapXercesDocument(const XalanDocument*	theDocument) const;
  +#endif
   
   	/** 
   	 * Map a pointer to a XalanDocument instance to its corresponding
  @@ -439,9 +460,31 @@
   
   	struct DocumentEntry
   	{
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   		bool	m_isDeprecated;
  -		bool	m_isOwned;
   
  +        bool
  +        isDeprecated() const
  +        {
  +            return m_isDeprecated;
  +        }
  +#else
  +        bool
  +        isDeprecated() const
  +        {
  +            return false;
  +        }
  +#endif
  +
  +        bool	m_isOwned;
  +
  +        bool
  +        isOwned() const
  +        {
  +            return m_isOwned;
  +        }
  +
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   		union
   		{
   			XercesDocumentBridge*	m_bridge;
  @@ -460,7 +503,7 @@
   			return *this;
   		}
   
  -		DocumentEntry&
  +        DocumentEntry&
   		operator=(XercesDocumentWrapper*	theWrapper)
   		{
   			m_isDeprecated = false;
  @@ -471,6 +514,19 @@
   
   			return *this;
   		}
  +#else
  +        XercesDocumentWrapper*  m_wrapper;
  +
  +        DocumentEntry&
  +		operator=(XercesDocumentWrapper*	theWrapper)
  +		{
  +			m_wrapper = theWrapper;
  +
  +			m_isOwned = true;
  +
  +			return *this;
  +		}
  +#endif
   	};
   
   #if defined(XALAN_NO_STD_NAMESPACE)
  @@ -639,6 +695,7 @@
   	virtual SAXParserType*
   	CreateSAXParser();
   
  +#if defined(XALAN_BUILD_DEPRECATED_DOM_BRIDGE)
   	/**
   	 * Create a XalanDocument proxy for an existing Xerces document.
   	 *
  @@ -654,6 +711,7 @@
   			const DOM_Document_Type& 	theXercesDocument,
   			bool						threadSafe,
   			bool						buildBridge);
  +#endif
   
   	/**
   	 * Create a XalanDocument proxy for an existing Xerces document.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org