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/samples/ExternalFunction ExternalFunction.cpp
Date Fri, 16 Aug 2002 18:34:10 GMT
dbertoni    2002/08/16 11:34:10

  Modified:    c/samples/ExternalFunction ExternalFunction.cpp
  Log:
  Scope XalanTransformer instance.
  
  Revision  Changes    Path
  1.24      +28 -26    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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ExternalFunction.cpp	17 Apr 2002 05:17:46 -0000	1.23
  +++ ExternalFunction.cpp	16 Aug 2002 18:34:10 -0000	1.24
  @@ -308,38 +308,40 @@
   		// Initialize Xalan.
   		XalanTransformer::initialize();
   
  -		// Create a XalanTransformer.
  -		XalanTransformer theXalanTransformer;
  +		{
  +			// Create a XalanTransformer.
  +			XalanTransformer theXalanTransformer;
   
  -		// The namespace for our functions...
  -		const XalanDOMString	theNamespace("http://ExternalFunction.xalan-c++.xml.apache.org");
  +			// The namespace for our functions...
  +			const XalanDOMString	theNamespace("http://ExternalFunction.xalan-c++.xml.apache.org");
   
  -		// Install the functions in the local space.  They will only
  -		// be installed in this instance, so no other instances
  -		// will know about them...
  -		theXalanTransformer.installExternalFunction(
  -			theNamespace,
  -			XalanDOMString("asctime"),
  -			FunctionAsctime());
  +			// Install the functions in the local space.  They will only
  +			// be installed in this instance, so no other instances
  +			// will know about them...
  +			theXalanTransformer.installExternalFunction(
  +				theNamespace,
  +				XalanDOMString("asctime"),
  +				FunctionAsctime());
   
  -		theXalanTransformer.installExternalFunction(
  -			theNamespace,
  -			XalanDOMString("square-root"),
  -			FunctionSquareRoot());
  +			theXalanTransformer.installExternalFunction(
  +				theNamespace,
  +				XalanDOMString("square-root"),
  +				FunctionSquareRoot());
   
  -		theXalanTransformer.installExternalFunction(
  -			theNamespace,
  -			XalanDOMString("cube"),
  -			FunctionCube());
  +			theXalanTransformer.installExternalFunction(
  +				theNamespace,
  +				XalanDOMString("cube"),
  +				FunctionCube());
   
  -		// Do the transform.
  -		theResult = theXalanTransformer.transform("foo.xml", "foo.xsl", "foo.out");
  +			// Do the transform.
  +			theResult = theXalanTransformer.transform("foo.xml", "foo.xsl", "foo.out");
       
  -		if(theResult != 0)
  -		{
  -			cerr << "ExternalFunction Error: \n" << theXalanTransformer.getLastError()
  -				 << endl
  -				 << endl;
  +			if(theResult != 0)
  +			{
  +				cerr << "ExternalFunction Error: \n" << theXalanTransformer.getLastError()
  +					 << endl
  +					 << endl;
  +			}
   		}
   
   		// Terminate Xalan.
  
  
  

---------------------------------------------------------------------
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