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 2001/06/07 21:10:11 UTC

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

dbertoni    01/06/07 12:10:10

  Modified:    c/src/XalanTransformer XalanCompiledStylesheet.hpp
                        XalanTransformer.cpp XalanTransformer.hpp
  Added:       c/src/XalanTransformer XalanCompiledStylesheetDefault.cpp
                        XalanCompiledStylesheetDefault.hpp
  Removed:     c/src/XalanTransformer XalanCompiledStylesheet.cpp
  Log:
  Cleaned up stuff.
  
  Revision  Changes    Path
  1.3       +5 -36     xml-xalan/c/src/XalanTransformer/XalanCompiledStylesheet.hpp
  
  Index: XalanCompiledStylesheet.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanCompiledStylesheet.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanCompiledStylesheet.hpp	2001/04/19 18:49:53	1.2
  +++ XalanCompiledStylesheet.hpp	2001/06/07 19:10:02	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -64,19 +64,6 @@
   
   
   
  -#include <XPath/XPathFactoryBlock.hpp>
  -
  -
  -
  -#include <XSLT/StylesheetConstructionContextDefault.hpp>
  -#include <XSLT/StylesheetExecutionContextDefault.hpp>
  -#include <XSLT/StylesheetRoot.hpp>
  -#include <XSLT/XSLTEngineImpl.hpp>
  -#include <XSLT/XSLTInputSource.hpp>
  -#include <XSLT/XSLTProcessorEnvSupportDefault.hpp>
  -
  -
  -
   /**
    * This is an abstraction of the StylesheetRoot class. It is designed
    * to allow a XalanTranfomer object to reuse a compliled stylesheet. 
  @@ -84,32 +71,14 @@
   class XALAN_TRANSFORMER_EXPORT XalanCompiledStylesheet
   {
   public:
  -	
  -	XalanCompiledStylesheet(
  -			const XSLTInputSource&					theStylesheetSource,
  -			XSLTProcessorEnvSupportDefault&			theXSLTProcessorEnvSupport,
  -			XSLTEngineImpl&							theProcessor);
  -
  -	~XalanCompiledStylesheet();
   
  -	void
  -	setStylesheetRoot(
  -			StylesheetExecutionContextDefault&		theStylesheetExecutionContext) const;
  +	virtual
  +	~XalanCompiledStylesheet() {}
   
  -protected:
  -
  -private:
  -	
  -	XPathFactoryBlock						m_stylesheetXPathFactory;
  -
  -	StylesheetConstructionContextDefault	m_stylesheetConstructionContext;
  -
  -	const StylesheetRoot*					m_stylesheetRoot;
  +	virtual const StylesheetRoot*
  +	getStylesheetRoot() const = 0;
   };
   
   
   
   #endif	// XALANCOMPILEDSTYLESHEET_HEADER_GUARD
  -
  -
  -
  
  
  
  1.20      +6 -4      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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XalanTransformer.cpp	2001/06/06 21:41:11	1.19
  +++ XalanTransformer.cpp	2001/06/07 19:10:03	1.20
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -85,6 +85,7 @@
   
   
   
  +#include <XSLT/StylesheetConstructionContextDefault.hpp>
   #include <XSLT/StylesheetRoot.hpp>
   #include <XSLT/XSLTEngineImpl.hpp>
   #include <XSLT/XSLTInit.hpp>
  @@ -97,6 +98,7 @@
   
   
   
  +#include "XalanCompiledStylesheetDefault.hpp"
   #include "XalanDefaultDocumentBuilder.hpp"
   #include "XalanDefaultParsedSource.hpp"
   #include "XercesDOMParsedSource.hpp"
  @@ -402,7 +404,7 @@
   		m_stylesheetExecutionContext.setXSLTProcessor(&theProcessor);
   		
   		// Set the compiled stylesheet.
  -		theCompiledStylesheet->setStylesheetRoot(m_stylesheetExecutionContext);
  +		m_stylesheetExecutionContext.setStylesheetRoot(theCompiledStylesheet->getStylesheetRoot());
   
   		// Set the parameters if any.
   		for (ParamPairVectorType::size_type i = 0; i < m_paramPairs.size(); ++i)
  @@ -665,8 +667,8 @@
   		theProcessor.setProblemListener(&theProblemListener);
   
   		// Create a new XalanCompiledStylesheet.
  -		XalanCompiledStylesheet* const theCompiledStylesheet =
  -			new XalanCompiledStylesheet(
  +		XalanCompiledStylesheet* const	theCompiledStylesheet =
  +			new XalanCompiledStylesheetDefault(
   						theStylesheetSource, 
   						theXSLTProcessorEnvSupport,
   						theProcessor);
  
  
  
  1.23      +11 -19    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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- XalanTransformer.hpp	2001/06/06 21:41:11	1.22
  +++ XalanTransformer.hpp	2001/06/07 19:10:04	1.23
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -68,34 +68,26 @@
   
   
   
  -#include <XSLT/StylesheetConstructionContextDefault.hpp>
  -#include <XSLT/XSLTInputSource.hpp>
  -#include <XSLT/XSLTResultTarget.hpp>
  -
  -
  +#include <XPath/QNameByValue.hpp>
   
  -#include <XalanTransformer/XalanDocumentBuilder.hpp>
  -#include <XalanTransformer/XalanCompiledStylesheet.hpp>
  -#include <XalanTransformer/XalanParsedSource.hpp>
  -#include <XalanTransformer/XalanTransformerOutputStream.hpp>
   
   
  +#include <XSLT/StylesheetExecutionContextDefault.hpp>
  +#include <XSLT/XSLTInputSource.hpp>
  +#include <XSLT/XSLTResultTarget.hpp>
   
  -#if defined(XALAN_OLD_STREAM_HEADERS)
  -#include <iostream.h>
  -#else
  -#include <iostream>
  -#endif
   
   
  +#include <XalanTransformer/XalanTransformerOutputStream.hpp>
   
  -#if !defined(XALAN_NO_NAMESPACES)
  -	using std::ostream;
  -	using std::istream;
  -#endif
   
   
  +class Function;
   class XSLTInit;
  +class XalanDocumentBuilder;
  +class XalanCompiledStylesheet;
  +class XalanParsedSource;
  +class XalanTransformerOutputStream;
   
   
   
  
  
  
  1.1                  xml-xalan/c/src/XalanTransformer/XalanCompiledStylesheetDefault.cpp
  
  Index: XalanCompiledStylesheetDefault.cpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  #include "XalanCompiledStylesheetDefault.hpp"
  
  
  
  XalanCompiledStylesheetDefault::XalanCompiledStylesheetDefault(
  			const XSLTInputSource&				theStylesheetSource,
  			XSLTProcessorEnvSupportDefault&		theXSLTProcessorEnvSupport,
  			XSLTEngineImpl&						theProcessor):
  	XalanCompiledStylesheet(),
  	m_stylesheetXPathFactory(),
  	m_stylesheetConstructionContext(
  				theProcessor,
  				theXSLTProcessorEnvSupport,
  				m_stylesheetXPathFactory),
  	m_stylesheetRoot(
  				theProcessor.processStylesheet(
  				theStylesheetSource,
  				m_stylesheetConstructionContext))
  {
  }
  
  
  
  XalanCompiledStylesheetDefault::~XalanCompiledStylesheetDefault()
  {
  }
  
  
  
  const StylesheetRoot*
  XalanCompiledStylesheetDefault::getStylesheetRoot() const
  {
  	return m_stylesheetRoot;
  }
  
  
  
  1.1                  xml-xalan/c/src/XalanTransformer/XalanCompiledStylesheetDefault.hpp
  
  Index: XalanCompiledStylesheetDefault.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2000 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  #if !defined(XALANCOMPILEDSTYLESHEETDEFAULT_HEADER_GUARD)
  #define XALANCOMPILEDSTYLESHEETDEFAULT_HEADER_GUARD
  
  
  
  // Base include file.  Must be first.
  #include <XalanTransformer/XalanTransformerDefinitions.hpp>
  
  
  
  #include <XPath/XPathFactoryBlock.hpp>
  
  
  
  #include <XSLT/StylesheetConstructionContextDefault.hpp>
  #include <XSLT/StylesheetExecutionContextDefault.hpp>
  #include <XSLT/StylesheetRoot.hpp>
  #include <XSLT/XSLTEngineImpl.hpp>
  #include <XSLT/XSLTInputSource.hpp>
  #include <XSLT/XSLTProcessorEnvSupportDefault.hpp>
  
  
  
  #include <XalanTransformer/XalanCompiledStylesheet.hpp>
  
  
  
  class XALAN_TRANSFORMER_EXPORT XalanCompiledStylesheetDefault : public XalanCompiledStylesheet
  {
  public:
  	
  	XalanCompiledStylesheetDefault(
  			const XSLTInputSource&				theStylesheetSource,
  			XSLTProcessorEnvSupportDefault&		theXSLTProcessorEnvSupport,
  			XSLTEngineImpl&						theProcessor);
  
  	virtual
  	~XalanCompiledStylesheetDefault();
  
  	virtual const StylesheetRoot*
  	getStylesheetRoot() const;
  
  private:
  
  	XPathFactoryBlock						m_stylesheetXPathFactory;
  
  	StylesheetConstructionContextDefault	m_stylesheetConstructionContext;
  
  	const StylesheetRoot*					m_stylesheetRoot;
  };
  
  
  
  #endif	// XALANCOMPILEDSTYLESHEETDEFAULT_HEADER_GUARD
  
  
  

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