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...@locus.apache.org on 2000/08/10 21:14:03 UTC

cvs commit: xml-xalan/c/samples/XPathWrapper XPathWrapper.cpp

dbertoni    00/08/10 12:14:03

  Modified:    c/samples/CompileStylesheet CompileStylesheet.cpp
               c/samples/ExternalFunction ExternalFunction.cpp
               c/samples/SimpleTransform SimpleTransform.cpp
               c/samples/ThreadSafe ThreadSafe.cpp
               c/samples/TraceListen TraceListen.cpp
               c/samples/UseStylesheetParam UseStylesheetParam.cpp
               c/samples/XPathWrapper XPathWrapper.cpp
  Log:
  Changes for new interfaces.
  
  Revision  Changes    Path
  1.7       +3 -9      xml-xalan/c/samples/CompileStylesheet/CompileStylesheet.cpp
  
  Index: CompileStylesheet.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/CompileStylesheet/CompileStylesheet.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CompileStylesheet.cpp	2000/07/21 19:00:07	1.6
  +++ CompileStylesheet.cpp	2000/08/10 19:14:00	1.7
  @@ -60,9 +60,7 @@
   			XercesParserLiaison				theParserLiaison(theDOMSupport);
   			XPathSupportDefault				theXPathSupport(theDOMSupport);
   			XSLTProcessorEnvSupportDefault	theXSLTProcessorEnvSupport;
  -			XObjectFactoryDefault			theXObjectFactory(
  -					theXSLTProcessorEnvSupport,
  -					theXPathSupport);
  +			XObjectFactoryDefault			theXObjectFactory;
   			XPathFactoryDefault				theXPathFactory;
   
   			// Create a processor...
  @@ -77,11 +75,8 @@
   			theXSLTProcessorEnvSupport.setProcessor(&theProcessor);
   
   			// Create separate factory support objects so the stylesheet's
  -			// factory-created XObject and XPath instances are independent 
  -			// from processor's.
  -			XObjectFactoryDefault			theStylesheetXObjectFactory(
  -						theXSLTProcessorEnvSupport,
  -						theXPathSupport);
  +			// factory-created XPath instances are independent from the
  +			// processor's.
   			XPathFactoryDefault				theStylesheetXPathFactory;
   
   			// Create a stylesheet construction context, using the
  @@ -89,7 +84,6 @@
   			StylesheetConstructionContextDefault	theConstructionContext(
   						theProcessor,
   						theXSLTProcessorEnvSupport,
  -						theStylesheetXObjectFactory,
   						theStylesheetXPathFactory);
   
   			// The execution context uses the same factory support objects as
  
  
  
  1.6       +1 -2      xml-xalan/c/samples/ExternalFunction/ExternalFunction.cpp
  
  Index: ExternalFunction.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/ExternalFunction/ExternalFunction.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ExternalFunction.cpp	2000/07/21 18:59:32	1.5
  +++ ExternalFunction.cpp	2000/08/10 19:14:01	1.6
  @@ -260,7 +260,7 @@
   			XercesParserLiaison				theParserLiaison(theDOMSupport);
   			XPathSupportDefault				theXPathSupport(theDOMSupport);
   			XSLTProcessorEnvSupportDefault	theXSLTProcessorEnvSupport;
  -			XObjectFactoryDefault			theXObjectFactory(theXSLTProcessorEnvSupport, theXPathSupport);
  +			XObjectFactoryDefault			theXObjectFactory;
   			XPathFactoryDefault				theXPathFactory;
   
   			// Create a processor...
  @@ -279,7 +279,6 @@
   			StylesheetConstructionContextDefault	theConstructionContext(
   						theProcessor,
   						theXSLTProcessorEnvSupport,
  -						theXObjectFactory,
   						theXPathFactory);
   
   			StylesheetExecutionContextDefault		theExecutionContext(
  
  
  
  1.7       +1 -2      xml-xalan/c/samples/SimpleTransform/SimpleTransform.cpp
  
  Index: SimpleTransform.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/SimpleTransform/SimpleTransform.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SimpleTransform.cpp	2000/07/21 19:17:56	1.6
  +++ SimpleTransform.cpp	2000/08/10 19:14:01	1.7
  @@ -69,7 +69,7 @@
   			XercesParserLiaison				theParserLiaison(theDOMSupport);
   			XPathSupportDefault				theXPathSupport(theDOMSupport);
   			XSLTProcessorEnvSupportDefault	theXSLTProcessorEnvSupport;
  -			XObjectFactoryDefault			theXObjectFactory(theXSLTProcessorEnvSupport, theXPathSupport);
  +			XObjectFactoryDefault			theXObjectFactory;
   			XPathFactoryDefault				theXPathFactory;
   
   			// Create a processor...
  @@ -88,7 +88,6 @@
   			StylesheetConstructionContextDefault	theConstructionContext(
   						theProcessor,
   						theXSLTProcessorEnvSupport,
  -						theXObjectFactory,
   						theXPathFactory);
   
   			StylesheetExecutionContextDefault		theExecutionContext(
  
  
  
  1.6       +8 -19     xml-xalan/c/samples/ThreadSafe/ThreadSafe.cpp
  
  Index: ThreadSafe.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/ThreadSafe/ThreadSafe.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ThreadSafe.cpp	2000/07/21 19:17:34	1.5
  +++ ThreadSafe.cpp	2000/08/10 19:14:01	1.6
  @@ -71,8 +71,7 @@
   	XercesParserLiaison				theParserLiaison(theDOMSupport);
   	XPathSupportDefault				theXPathSupport(theDOMSupport);
   	XSLTProcessorEnvSupportDefault	theXSLTProcessorEnvSupport;
  -	XObjectFactoryDefault			theXObjectFactory(theXSLTProcessorEnvSupport,
  -													  theXPathSupport);
  +	XObjectFactoryDefault			theXObjectFactory;
   	XPathFactoryDefault				theXPathFactory;
   
   	// Create a processor...and output the start message.
  @@ -192,8 +191,7 @@
   			XercesParserLiaison				ssParserLiaison(ssDOMSupport);
   			XPathSupportDefault				ssXPathSupport(ssDOMSupport);
   			XSLTProcessorEnvSupportDefault	ssXSLTProcessorEnvSupport;
  -			XObjectFactoryDefault			ssXObjectFactory(ssXSLTProcessorEnvSupport,
  -															 ssXPathSupport);
  +			XObjectFactoryDefault			ssXObjectFactory;
   			XPathFactoryDefault				ssXPathFactory;
   
   			// Create a processor...
  @@ -201,27 +199,18 @@
   			// Each thread uses its own processor to perform a transformation.
   
   			XSLTEngineImpl	ssProcessor(
  -      					  ssParserLiaison,
  -	      		    	ssXPathSupport,
  -		  	        	ssXSLTProcessorEnvSupport,
  -		    	  		  ssXObjectFactory,
  -        				  ssXPathFactory);
  -
  -			// Create separate factory support objects so the stylesheet's
  -			// factory-created XObject and XPath instances are independent 
  -			// from the processor's.
  -			XObjectFactoryDefault	ssStylesheetXObjectFactory(
  -									ssXSLTProcessorEnvSupport,
  -									ssXPathSupport);
  -			XPathFactoryDefault		ssStylesheetXPathFactory;
  +					ssParserLiaison,
  +					ssXPathSupport,
  +					ssXSLTProcessorEnvSupport,
  +					ssXObjectFactory,
  +					ssXPathFactory);
   
   			// Create a stylesheet construction context, using the
   			// stylesheet's factory support objects.
   			StylesheetConstructionContextDefault	ssConstructionContext(
   													ssProcessor,
   													ssXSLTProcessorEnvSupport,
  -													ssStylesheetXObjectFactory,
  -													ssStylesheetXPathFactory);
  +													ssXPathFactory);
   
   			const XalanDOMString  theXSLFileName("birds.xsl");
   			const XalanDOMString  theXMLFileName("birds.xml");
  
  
  
  1.3       +1 -2      xml-xalan/c/samples/TraceListen/TraceListen.cpp
  
  Index: TraceListen.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/TraceListen/TraceListen.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TraceListen.cpp	2000/07/21 19:16:33	1.2
  +++ TraceListen.cpp	2000/08/10 19:14:02	1.3
  @@ -88,7 +88,7 @@
   		XercesParserLiaison				theParserLiaison(theDOMSupport);
   		XPathSupportDefault				theXPathSupport(theDOMSupport);
   		XSLTProcessorEnvSupportDefault	theXSLTProcessorEnvSupport;
  -		XObjectFactoryDefault			theXObjectFactory(theXSLTProcessorEnvSupport, theXPathSupport);
  +		XObjectFactoryDefault			theXObjectFactory;
   		XPathFactoryDefault				theXPathFactory;
   
   		// Create a processor...
  @@ -107,7 +107,6 @@
   		StylesheetConstructionContextDefault	theConstructionContext(
   						theProcessor,
   						theXSLTProcessorEnvSupport,
  -						theXObjectFactory,
   						theXPathFactory);
   
   		StylesheetExecutionContextDefault		theExecutionContext(
  
  
  
  1.5       +1 -3      xml-xalan/c/samples/UseStylesheetParam/UseStylesheetParam.cpp
  
  Index: UseStylesheetParam.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/UseStylesheetParam/UseStylesheetParam.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- UseStylesheetParam.cpp	2000/07/21 19:15:43	1.4
  +++ UseStylesheetParam.cpp	2000/08/10 19:14:02	1.5
  @@ -72,8 +72,7 @@
   		XercesParserLiaison				theParserLiaison(theDOMSupport);
   		XPathSupportDefault				theXPathSupport(theDOMSupport);
   		XSLTProcessorEnvSupportDefault	theXSLTProcessorEnvSupport;
  -		XObjectFactoryDefault			theXObjectFactory(theXSLTProcessorEnvSupport, 
  -				                                          theXPathSupport);
  +		XObjectFactoryDefault			theXObjectFactory;
   		XPathFactoryDefault				theXPathFactory;
   
   		// Create a processor...
  @@ -93,7 +92,6 @@
   		StylesheetConstructionContextDefault	theConstructionContext(
   						theProcessor,
   						theXSLTProcessorEnvSupport,
  -						theXObjectFactory,
   						theXPathFactory);
   
   		StylesheetExecutionContextDefault		theExecutionContext(
  
  
  
  1.5       +3 -5      xml-xalan/c/samples/XPathWrapper/XPathWrapper.cpp
  
  Index: XPathWrapper.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/XPathWrapper/XPathWrapper.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XPathWrapper.cpp	2000/04/27 14:47:48	1.4
  +++ XPathWrapper.cpp	2000/08/10 19:14:03	1.5
  @@ -100,7 +100,7 @@
   		// configure the objects needed for XPath to work with the Xerces DOM
   		XPathEnvSupportDefault			theEnvSupport;
   		XPathSupportDefault				theSupport(theDOMSupport);
  -		XObjectFactoryDefault			theXObjectFactory(theEnvSupport, theSupport);
  +		XObjectFactoryDefault			theXObjectFactory;
   		XPathExecutionContextDefault	theExecutionContext(theEnvSupport, theSupport, theXObjectFactory);
   		XPathFactoryDefault				theXPathFactory;
   		XPathProcessorImpl				theXPathProcessor;
  @@ -114,15 +114,14 @@
   			theXPathProcessor.initXPath(*contextXPath,
   										XalanDOMString(context.c_str()),
   										ElementPrefixResolverProxy(rootElem, theEnvSupport, theSupport),
  -										theXObjectFactory,
   										theEnvSupport);
   
  -	   		XObject*	xObj =
  +	   		const XObject*	xObj =
   				contextXPath->execute(rootElem,
   									  ElementPrefixResolverProxy(rootElem, theEnvSupport, theSupport),
   									  theExecutionContext);
   
  -			const NodeRefListBase&	contextNodeList = xObj->mutableNodeset();
  +			const NodeRefListBase&	contextNodeList = xObj->nodeset();
   
   			const unsigned int	theLength =
   					contextNodeList.getLength();
  @@ -155,7 +154,6 @@
   				theXPathProcessor.initXPath(*xpath,
   											XalanDOMString(expr.c_str()),
   											ElementPrefixResolverProxy(rootElem, theEnvSupport, theSupport),
  -											theXObjectFactory,
   											theEnvSupport);
   
   				xObj = xpath->execute(contextNodeList.item(0),