You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by au...@apache.org on 2001/02/09 23:05:14 UTC

cvs commit: xml-xalan/c/src/XalanTransformer XalanTransformer.cpp XalanTransformer.hpp

auriemma    01/02/09 14:05:14

  Modified:    c/src/XalanTransformer XalanTransformer.cpp
                        XalanTransformer.hpp
  Log:
  Added more transforms overloads.
  
  Revision  Changes    Path
  1.6       +69 -0     xml-xalan/c/src/XalanTransformer/XalanTransformer.cpp
  
  Index: XalanTransformer.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanTransformer.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XalanTransformer.cpp	2001/02/08 15:38:50	1.5
  +++ XalanTransformer.cpp	2001/02/09 22:05:12	1.6
  @@ -267,6 +267,31 @@
   int
   XalanTransformer::transform(
   		const char*		theXMLFileName, 
  +		const char*		theOutFileName)
  +{
  +	// Set input sources
  +	const XalanDOMString	theDOMStringXMLFileName(theXMLFileName);
  +
  +	XSLTInputSource	theInputSource(c_wstr(theDOMStringXMLFileName));
  +	XSLTInputSource	theStylesheetSource;
  +
  +	// Set output target
  +	const XalanDOMString	theDomStringOutFileName(theOutFileName);
  +	
  +	XSLTResultTarget		theResultTarget(theDomStringOutFileName);
  +
  +	// Do the transformation...
  +	return transform(
  +					theInputSource, 
  +					theStylesheetSource,
  +					theResultTarget);
  +}
  +
  +
  +
  +int
  +XalanTransformer::transform(
  +		const char*		theXMLFileName, 
   		const char*		theXSLFileName,
   		ostream&		theOutStream)
   {
  @@ -291,6 +316,29 @@
   
   int
   XalanTransformer::transform(
  +		const char*		theXMLFileName, 
  +		ostream&		theOutStream)
  +{
  +	// Set input sources
  +	const XalanDOMString	theDOMStringXMLFileName(theXMLFileName);
  +	
  +	XSLTInputSource	theInputSource(c_wstr(theDOMStringXMLFileName));
  +	XSLTInputSource		theStylesheetSource;	
  +
  +	// Set output target
  +	XSLTResultTarget	theResultTarget(&theOutStream);
  +
  +	// Do the transformation...
  +	return transform(
  +					theInputSource, 
  +					theStylesheetSource,
  +					theResultTarget);
  +}
  +
  +
  +
  +int
  +XalanTransformer::transform(
   		istream&		theXMLInStream, 
   		istream&		theXSLInStream,
   		ostream&		theOutStream)
  @@ -298,6 +346,27 @@
   	// Set input sources
   	XSLTInputSource		theInputSource(&theXMLInStream);
   	XSLTInputSource		theStylesheetSource(&theXSLInStream);
  +	
  +	// Set output target
  +	XSLTResultTarget	theResultTarget(&theOutStream);
  +
  +	// Do the transformation...
  +	return transform(
  +					theInputSource, 
  +					theStylesheetSource,
  +					theResultTarget);
  +}
  +
  +
  +
  +int
  +XalanTransformer::transform(
  +		istream&		theXMLInStream, 		
  +		ostream&		theOutStream)
  +{
  +	// Set input sources
  +	XSLTInputSource		theInputSource(&theXMLInStream);
  +	XSLTInputSource		theStylesheetSource;	
   	
   	// Set output target
   	XSLTResultTarget	theResultTarget(&theOutStream);
  
  
  
  1.8       +46 -0     xml-xalan/c/src/XalanTransformer/XalanTransformer.hpp
  
  Index: XalanTransformer.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanTransformer.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XalanTransformer.hpp	2001/02/08 21:18:11	1.7
  +++ XalanTransformer.hpp	2001/02/09 22:05:13	1.8
  @@ -182,6 +182,21 @@
   			const char*					theOutFileName);
   
   	/**
  +	 * Transform the XML source tree to the given result file.
  +	 * The processor will apply the the stylesheet provided as a PI in the 
  +	 * the XML to the input file and write the transformation output to the 
  +	 * output file.
  +	 *
  +	 * @param theXMLFileName	filename of XML input file	
  +	 * @param theOutFileName	filename of output file
  +	 * @return	0 for success
  +	 */
  +	int
  +	transform(
  +			const char*					theXMLFileName, 
  +			const char*					theOutFileName);
  +
  +	/**
   	 * Transform the XML source tree to an output stream.
   	 * The processor will apply the the stylesheet file to the input file
   	 * and write the transformation output to the output stream.
  @@ -199,6 +214,22 @@
   
   	/**
   	 * Transform the XML source tree to an output stream.
  +	 * The processor will apply the the stylesheet provided as a PI in the
  +	 * the XML to the input file and write the transformation output to the 
  +	 * output stream.
  +	 *
  +	 * @param theXMLFileName	filename of XML input source
  +	 * @param theXSLFileName	filename of stylesheet source
  +	 * @param theOutStream		a std ostream for the output
  +	 * @return	0 for success
  +	 */
  +	int
  +	transform(
  +			const char*					theXMLFileName, 
  +			ostream&					theOutStream);
  +
  +	/**
  +	 * Transform the XML source tree to an output stream.
   	 * The processor will apply the the stylesheet stream to the input stream
   	 * and write the transformation output to the output stream.
   	 *
  @@ -211,6 +242,21 @@
   	transform(
   			istream&					theXMLInStream, 
   			istream&					theXSLInStream,
  +			ostream&					theOutStream);
  +	
  +	/**
  +	 * Transform the XML source tree to an output stream.
  +	 * The processor will apply the the stylesheet provided as a PI in the 
  +	 * XML of the input stream and write the transformation output to the 
  +	 * output stream.
  +	 *
  +	 * @param theXMLInStream	a std istream for the input
  +	 * @param theOutStream		a std ostream for the output
  +	 * @return	0 for success
  +	 */
  +	int
  +	transform(
  +			istream&					theXMLInStream, 
   			ostream&					theOutStream);
   
   	/**