xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbert...@apache.org
Subject cvs commit: xml-xalan/c/src/TestXPath TestXPath.cpp
Date Thu, 31 Oct 2002 08:06:29 GMT
dbertoni    2002/10/31 00:06:29

  Modified:    c/src/TestXPath TestXPath.cpp
  Log:
  Updates for new signatures.
  
  Revision  Changes    Path
  1.34      +98 -65    xml-xalan/c/src/TestXPath/TestXPath.cpp
  
  Index: TestXPath.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/TestXPath/TestXPath.cpp,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- TestXPath.cpp	23 Feb 2002 04:19:13 -0000	1.33
  +++ TestXPath.cpp	31 Oct 2002 08:06:29 -0000	1.34
  @@ -106,6 +106,7 @@
   #include <XPath/XPathEnvSupportDefault.hpp>
   #include <XPath/XPathExecutionContextDefault.hpp>
   #include <XPath/XPath.hpp>
  +#include <XPath/XPathConstructionContextDefault.hpp>
   #include <XPath/XPathProcessorImpl.hpp>
   #include <XPath/XPathFactoryDefault.hpp>
   
  @@ -128,17 +129,20 @@
   
   const XObjectPtr
   ExecuteXPath(
  -			XPathProcessor&			theXPathProcessor,
  -			XPath&					theXPath,
  -			const XalanDOMString&	theXPathString,
  -			XalanNode* 				theContextNode,
  -			const PrefixResolver&	thePrefixResolver,
  -			const NodeRefListBase& 	theContextNodeList,
  -			XPathExecutionContext&	theExecutionContext)
  -{
  -	theXPathProcessor.initXPath(theXPath,
  -								theXPathString,
  -								thePrefixResolver);
  +			XPathProcessor&				theXPathProcessor,
  +			XPathConstructionContext&	theXPathConstructionContext,
  +			XPath&						theXPath,
  +			const XalanDOMString&		theXPathString,
  +			XalanNode* 					theContextNode,
  +			const PrefixResolver&		thePrefixResolver,
  +			const NodeRefListBase& 		theContextNodeList,
  +			XPathExecutionContext&		theExecutionContext)
  +{
  +	theXPathProcessor.initXPath(
  +				theXPath,
  +				theXPathConstructionContext,
  +				theXPathString,
  +				thePrefixResolver);
   
   	const XObjectPtr theResult =
   		theXPath.execute(theContextNode, thePrefixResolver, theContextNodeList, theExecutionContext);
  @@ -150,26 +154,29 @@
   
   bool
   TestNumericResult(
  -			XPathProcessor&			theXPathProcessor,
  -			XPath&					theXPath,
  -			const XalanDOMString&	theXPathString,
  -			PrintWriter&			thePrintWriter,
  -			double					theExpectedResult,
  -			XalanNode* 				theContextNode,
  -			const PrefixResolver&	thePrefixResolver,
  -			const NodeRefListBase& 	theContextNodeList,
  -			XPathExecutionContext&	theExecutionContext)
  +			XPathProcessor&				theXPathProcessor,
  +			XPath&						theXPath,
  +			XPathConstructionContext&	theXPathConstructionContext,
  +			const XalanDOMString&		theXPathString,
  +			PrintWriter&				thePrintWriter,
  +			double						theExpectedResult,
  +			XalanNode* 					theContextNode,
  +			const PrefixResolver&		thePrefixResolver,
  +			const NodeRefListBase& 		theContextNodeList,
  +			XPathExecutionContext&		theExecutionContext)
   {
   	bool	fError = false;
   
   	const XObjectPtr theResult =
  -		ExecuteXPath(theXPathProcessor,
  -					 theXPath,
  -					 theXPathString,
  -					 theContextNode,
  -					 thePrefixResolver,
  -					 theContextNodeList,
  -					 theExecutionContext);
  +		ExecuteXPath(
  +			theXPathProcessor,
  +			theXPathConstructionContext,
  +			theXPath,
  +			theXPathString,
  +			theContextNode,
  +			thePrefixResolver,
  +			theContextNodeList,
  +			theExecutionContext);
   
   	thePrintWriter.print(XALAN_STATIC_UCODE_STRING("Execution of XPath "));
   	thePrintWriter.print(theXPathString);
  @@ -198,26 +205,29 @@
   
   bool
   TestStringResult(
  -			XPathProcessor&			theXPathProcessor,
  -			XPath&					theXPath,
  -			const XalanDOMString&	theXPathString,
  -			PrintWriter&			thePrintWriter,
  -			const XalanDOMString&	theExpectedResult,
  -			XalanNode* 				theContextNode,
  -			const PrefixResolver&	thePrefixResolver,
  -			const NodeRefListBase& 	theContextNodeList,
  -			XPathExecutionContext&	theExecutionContext)
  +			XPathProcessor&				theXPathProcessor,
  +			XPath&						theXPath,
  +			XPathConstructionContext&	theXPathConstructionContext,
  +			const XalanDOMString&		theXPathString,
  +			PrintWriter&				thePrintWriter,
  +			const XalanDOMString&		theExpectedResult,
  +			XalanNode* 					theContextNode,
  +			const PrefixResolver&		thePrefixResolver,
  +			const NodeRefListBase& 		theContextNodeList,
  +			XPathExecutionContext&		theExecutionContext)
   {
   	bool	fError = false;
   
   	const XObjectPtr theResult =
  -		ExecuteXPath(theXPathProcessor,
  -					 theXPath,
  -					 theXPathString,
  -					 theContextNode,
  -					 thePrefixResolver,
  -					 theContextNodeList,
  -					 theExecutionContext);
  +		ExecuteXPath(
  +			theXPathProcessor,
  +			theXPathConstructionContext,
  +			theXPath,
  +			theXPathString,
  +			theContextNode,
  +			thePrefixResolver,
  +			theContextNodeList,
  +			theExecutionContext);
   
   	thePrintWriter.print(XALAN_STATIC_UCODE_STRING("Execution of XPath "));
   	thePrintWriter.print(theXPathString);
  @@ -249,26 +259,29 @@
   
   bool
   TestBooleanResult(
  -			XPathProcessor&			theXPathProcessor,
  -			XPath&					theXPath,
  +			XPathProcessor&				theXPathProcessor,
  +			XPath&						theXPath,
  +			XPathConstructionContext&	theXPathConstructionContext,
   			const XalanDOMString&		theXPathString,
  -			PrintWriter&			thePrintWriter,
  -			bool					theExpectedResult,
  -			XalanNode* 		theContextNode,
  -			const PrefixResolver&	thePrefixResolver,
  -			const NodeRefListBase& 	theContextNodeList,
  -			XPathExecutionContext&	theExecutionContext)
  +			PrintWriter&				thePrintWriter,
  +			bool						theExpectedResult,
  +			XalanNode* 					theContextNode,
  +			const PrefixResolver&		thePrefixResolver,
  +			const NodeRefListBase& 		theContextNodeList,
  +			XPathExecutionContext&		theExecutionContext)
   {
   	bool	fError = false;
   
   	const XObjectPtr theResult =
  -		ExecuteXPath(theXPathProcessor,
  -					 theXPath,
  -					 theXPathString,
  -					 theContextNode,
  -					 thePrefixResolver,
  -					 theContextNodeList,
  -					 theExecutionContext);
  +		ExecuteXPath(
  +			theXPathProcessor,
  +			theXPathConstructionContext,
  +			theXPath,
  +			theXPathString,
  +			theContextNode,
  +			thePrefixResolver,
  +			theContextNodeList,
  +			theExecutionContext);
   
   	bool	fDump = false;
   
  @@ -437,6 +450,8 @@
   
   	XPath* const	theXPath = theXPathFactory.create();
   
  +	XPathConstructionContextDefault		theXPathConstructionContext;
  +
   	XPathGuard		theGuard(
   						theXPathFactory,
   						theXPath);
  @@ -446,13 +461,15 @@
   	NodeRefList					theContextNodeList;
   
   	const XObjectPtr	theXObject =
  -		ExecuteXPath(theXPathProcessor,
  -					 *theXPath,
  -					 theContextNodeMatchPattern,
  -					 theDocument,
  -					 thePrefixResolver,
  -					 theContextNodeList,
  -					 theExecutionContext);
  +		ExecuteXPath(
  +			theXPathProcessor,
  +			theXPathConstructionContext,
  +			*theXPath,
  +			theContextNodeMatchPattern,
  +			theDocument,
  +			thePrefixResolver,
  +			theContextNodeList,
  +			theExecutionContext);
   
   	try
   	{
  @@ -537,10 +554,13 @@
   
   				XPath* const	theXPath = theXPathFactory.create();
   
  +				XPathConstructionContextDefault		theXPathConstructionContext;
  +
   				XPathGuard		theGuard(theXPathFactory,
   										 theXPath);
   
   				theXPathProcessor.initXPath(*theXPath,
  +											theXPathConstructionContext,
   											theXPathString,
   											thePrefixResolver);
   
  @@ -649,10 +669,13 @@
   
   				XPath* const	theXPath1 = theXPathFactory.create();
   
  +				XPathConstructionContextDefault		theXPathConstructionContext;
  +
   				XPathGuard	theGuard1(theXPathFactory,
   									  theXPath1);
   
   				theXPathProcessor.initXPath(*theXPath1,
  +											theXPathConstructionContext,
   											TranscodeFromLocalCodePage("following-sibling::*"),
   											thePrefixResolver);
   
  @@ -662,6 +685,7 @@
   									  theXPath2);
   
   				theXPathProcessor.initXPath(*theXPath2,
  +											theXPathConstructionContext,
   											TranscodeFromLocalCodePage("descendant::*"),
   											thePrefixResolver);
   
  @@ -826,11 +850,14 @@
   		{
   			XPath* const	theXPath = theXPathFactory.create();
   
  +			XPathConstructionContextDefault		theXPathConstructionContext;
  +
   			XPathGuard		theGuard(theXPathFactory,
   									 theXPath);
   
   			TestNumericResult(theXPathProcessor,
   							  *theXPath,
  +							  theXPathConstructionContext,
   							  TranscodeFromLocalCodePage(theNumericTestInput[i]),
   							  thePrintWriter,
   							  theNumericTestExpectedOutput[i],
  @@ -956,11 +983,14 @@
   		{
   			XPath* const	theXPath = theXPathFactory.create();
   
  +			XPathConstructionContextDefault		theXPathConstructionContext;
  +
   			XPathGuard	theGuard(theXPathFactory,
   								 theXPath);
   
   			TestStringResult(theXPathProcessor,
   							 *theXPath,
  +							 theXPathConstructionContext,
   							 TranscodeFromLocalCodePage(theStringTestInput[i]),
   							 thePrintWriter,
   							 TranscodeFromLocalCodePage(theStringTestExpectedOutput[i]),
  @@ -1090,11 +1120,14 @@
   		{
   			XPath* const	theXPath = theXPathFactory.create();
   
  +			XPathConstructionContextDefault		theXPathConstructionContext;
  +
   			XPathGuard	theGuard(theXPathFactory,
   								 theXPath);
   
   			TestBooleanResult(theXPathProcessor,
   							  *theXPath,
  +							  theXPathConstructionContext,
   							  TranscodeFromLocalCodePage(theBooleanTestInput[i]),
   							  thePrintWriter,
   							  theBooleanTestExpectedOutput[i],
  
  
  

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


Mime
View raw message