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 20:43:28 UTC

cvs commit: xml-xalan/c/src/XSLT AVTPartXPath.cpp AVTPartXPath.hpp ElemCopyOf.cpp ElemLiteralResult.cpp ElemNumber.cpp ElemNumber.hpp ElemTemplateElement.cpp ElemTemplateElement.hpp ElemValueOf.cpp ExtensionNSHandler.cpp ExtensionNSHandler.hpp FunctionDocument.cpp FunctionGenerateID.cpp FunctionGenerateID.hpp FunctionKey.cpp KeyTable.cpp Stylesheet.cpp Stylesheet.hpp StylesheetConstructionContextDefault.cpp StylesheetConstructionContextDefault.hpp StylesheetExecutionContext.hpp StylesheetExecutionContextDefault.cpp StylesheetExecutionContextDefault.hpp TraceListenerDefault.cpp VariablesStack.cpp VariablesStack.hpp XSLTEngineImpl.cpp XSLTEngineImpl.hpp XSLTProcessor.hpp

dbertoni    00/08/10 11:43:28

  Modified:    c/src/XSLT AVTPartXPath.cpp AVTPartXPath.hpp ElemCopyOf.cpp
                        ElemLiteralResult.cpp ElemNumber.cpp ElemNumber.hpp
                        ElemTemplateElement.cpp ElemTemplateElement.hpp
                        ElemValueOf.cpp ExtensionNSHandler.cpp
                        ExtensionNSHandler.hpp FunctionDocument.cpp
                        FunctionGenerateID.cpp FunctionGenerateID.hpp
                        FunctionKey.cpp KeyTable.cpp Stylesheet.cpp
                        Stylesheet.hpp
                        StylesheetConstructionContextDefault.cpp
                        StylesheetConstructionContextDefault.hpp
                        StylesheetExecutionContext.hpp
                        StylesheetExecutionContextDefault.cpp
                        StylesheetExecutionContextDefault.hpp
                        TraceListenerDefault.cpp VariablesStack.cpp
                        VariablesStack.hpp XSLTEngineImpl.cpp
                        XSLTEngineImpl.hpp XSLTProcessor.hpp
  Log:
  Changes for new and changed XalanNode and XPath interfaces.
  
  Revision  Changes    Path
  1.6       +0 -37     xml-xalan/c/src/XSLT/AVTPartXPath.cpp
  
  Index: AVTPartXPath.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/AVTPartXPath.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AVTPartXPath.cpp	2000/07/06 20:19:24	1.5
  +++ AVTPartXPath.cpp	2000/08/10 18:43:03	1.6
  @@ -78,43 +78,6 @@
   
   
   
  -static const XPath*
  -createAndInitXPath(
  -			const XalanDOMString&	val,
  -			const PrefixResolver&	resolver,
  -			XObjectFactory&			xobjectFactory,
  -			XPathEnvSupport&		xpathEnvSupport,
  -			XPathProcessor&			xpathProcessor, 
  -			XPathFactory&			xpathFactory)
  -{
  -	XPath* const	theXPath = xpathFactory.create();
  -
  -	xpathProcessor.initMatchPattern(*theXPath, val, resolver, xobjectFactory, xpathEnvSupport);
  -
  -	return theXPath;
  -}
  -
  -
  -
  -AVTPartXPath::AVTPartXPath(
  -			const XalanDOMString&	val,
  -			const PrefixResolver&	resolver,
  -			XObjectFactory&			xobjectFactory,
  -			XPathEnvSupport&		xpathEnvSupport,
  -			XPathProcessor&			xpathProcessor, 
  -			XPathFactory&			xpathFactory) :
  -	AVTPart(),
  -	m_pXPath(createAndInitXPath(val,
  -								resolver,
  -								xobjectFactory,
  -								xpathEnvSupport,
  -								xpathProcessor,
  -								xpathFactory))
  -{
  -}
  -
  -
  -
   void
   AVTPartXPath::	evaluate(
   			XalanDOMString&			buf,
  
  
  
  1.5       +1 -20     xml-xalan/c/src/XSLT/AVTPartXPath.hpp
  
  Index: AVTPartXPath.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/AVTPartXPath.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AVTPartXPath.hpp	2000/04/11 15:09:20	1.4
  +++ AVTPartXPath.hpp	2000/08/10 18:43:03	1.5
  @@ -58,7 +58,7 @@
   #define XALAN_AVTPARTXPATH_HEADER_GUARD 
   
   /**
  - * $Id: AVTPartXPath.hpp,v 1.4 2000/04/11 15:09:20 dbertoni Exp $
  + * $Id: AVTPartXPath.hpp,v 1.5 2000/08/10 18:43:03 dbertoni Exp $
    * 
    * $State: Exp $
    * 
  @@ -78,7 +78,6 @@
   class XPathEnvSupport;
   class XPathFactory;
   class XPathProcessor;
  -class XObjectFactory;
   
   
   
  @@ -95,24 +94,6 @@
   	 * @param xpath XPath to evaluate
   	 */
   	AVTPartXPath(const XPath*	xpath);
  -
  -	/**
  -	 * Construct an XPath Attribute Value Template (AVT) part from a string.
  -	 *
  -	 * @param val             pure string section of an AVT
  -	 * @param resolver        prefix resolver to use
  -	 * @param xobjectFactory  factory class instance for XObjects
  -	 * @param xpathEnvSupport XPath environment support class instance
  -	 * @param xpathProcessor  processor class instance for XPaths
  -	 * @param xpathFactory    factory class instance for XPaths
  -	 */
  -	AVTPartXPath(
  -			const XalanDOMString&	val,
  -			const PrefixResolver&	resolver,
  -			XObjectFactory&			xobjectFactory,
  -			XPathEnvSupport&		xpathEnvSupport,
  -			XPathProcessor&			xpathProcessor, 
  -			XPathFactory&			xpathFactory);
   
   
   	// These methods are inherited from AVTPart ...
  
  
  
  1.7       +1 -1      xml-xalan/c/src/XSLT/ElemCopyOf.cpp
  
  Index: ElemCopyOf.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemCopyOf.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ElemCopyOf.cpp	2000/07/06 20:19:24	1.6
  +++ ElemCopyOf.cpp	2000/08/10 18:43:04	1.7
  @@ -135,7 +135,7 @@
   				*this, XalanDOMString(XALAN_STATIC_UCODE_STRING("select")), *m_pSelectPattern, value.get()));
   	}
   
  -	const int	type = value->getType();
  +	const XObject::eObjectType	type = value->getType();
   
   	XalanDOMString s;
   
  
  
  
  1.16      +3 -3      xml-xalan/c/src/XSLT/ElemLiteralResult.cpp
  
  Index: ElemLiteralResult.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemLiteralResult.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ElemLiteralResult.cpp	2000/07/13 22:22:41	1.15
  +++ ElemLiteralResult.cpp	2000/08/10 18:43:04	1.16
  @@ -246,7 +246,7 @@
   					DOMServices::s_XMLNamespaceWithSeparator + prefix :
   							DOMServices::s_XMLNamespace;
   
  -				XalanDOMString srcURI = ns.getURI();
  +				XalanDOMString			srcURI = ns.getURI();
   
   				const XalanDOMString	alias = getStylesheet().getAliasNamespaceURI(srcURI);
   
  @@ -257,9 +257,9 @@
   
   				bool isXSLNS = equals(srcURI, executionContext.getXSLNameSpaceURL())
   					|| 0 != getStylesheet().lookupExtensionNSHandler(srcURI)
  -					|| equalsIgnoreCase(srcURI,executionContext.getXalanXSLNameSpaceURL());
  +					|| equals(srcURI,executionContext.getXalanXSLNameSpaceURL());
   
  -				if(!isXSLNS && !equalsIgnoreCase(srcURI,desturi)) // TODO: Check for extension namespaces
  +				if(!isXSLNS && !equals(srcURI, desturi)) // TODO: Check for extension namespaces
   				{
   					executionContext.addResultAttribute(attrName, srcURI);
   				}
  
  
  
  1.20      +2 -2      xml-xalan/c/src/XSLT/ElemNumber.cpp
  
  Index: ElemNumber.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.cpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ElemNumber.cpp	2000/07/14 01:44:01	1.19
  +++ ElemNumber.cpp	2000/08/10 18:43:04	1.20
  @@ -325,12 +325,12 @@
   
   
   
  -XPath*
  +const XPath*
   ElemNumber::getCountMatchPattern(
   			StylesheetExecutionContext&		executionContext,
   			XalanNode*						contextNode) const
   {
  -	XPath*	countMatchPattern = 0;
  +	const XPath*	countMatchPattern = 0;
   
   	switch(contextNode->getNodeType())
   	{
  
  
  
  1.15      +2 -2      xml-xalan/c/src/XSLT/ElemNumber.hpp
  
  Index: ElemNumber.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.hpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ElemNumber.hpp	2000/07/06 20:19:25	1.14
  +++ ElemNumber.hpp	2000/08/10 18:43:04	1.15
  @@ -58,7 +58,7 @@
   #define XALAN_ELEMNUMBER_HEADER_GUARD 
   
   /**
  - * $Id: ElemNumber.hpp,v 1.14 2000/07/06 20:19:25 dbertoni Exp $
  + * $Id: ElemNumber.hpp,v 1.15 2000/08/10 18:43:04 dbertoni Exp $
    * 
    * $State: Exp $
    * 
  @@ -186,7 +186,7 @@
   	/**
   	 * Get the count match pattern, or a default value.
   	 */
  -	XPath*
  +	const XPath*
   	getCountMatchPattern(
   			StylesheetExecutionContext&		executionContext,
   			XalanNode*						contextNode) const;
  
  
  
  1.28      +25 -1     xml-xalan/c/src/XSLT/ElemTemplateElement.cpp
  
  Index: ElemTemplateElement.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplateElement.cpp,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ElemTemplateElement.cpp	2000/07/28 22:02:20	1.27
  +++ ElemTemplateElement.cpp	2000/08/10 18:43:04	1.28
  @@ -641,7 +641,7 @@
   
   	if (0 != selectPattern)
   	{
  -		XObject*	theXObject = 0;
  +		const XObject*	theXObject = 0;
   
   		{
   			SetAndRestoreCurrentStackFrameIndex		theSetAndRestore(
  @@ -1305,6 +1305,30 @@
   ElemTemplateElement::setPrefix(const XalanDOMString&	/* prefix */)
   {
   	throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
  +}
  +
  +
  +
  +bool
  +ElemTemplateElement::isIndexed() const
  +{
  +	return false;
  +}
  +
  +
  +
  +unsigned long
  +ElemTemplateElement::getIndex() const
  +{
  +	return 0;
  +}
  +
  +
  +
  +XalanDOMString
  +ElemTemplateElement::getXSLTData() const
  +{
  +	return DOMString();
   }
   
   
  
  
  
  1.15      +9 -0      xml-xalan/c/src/XSLT/ElemTemplateElement.hpp
  
  Index: ElemTemplateElement.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplateElement.hpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ElemTemplateElement.hpp	2000/08/07 19:52:03	1.14
  +++ ElemTemplateElement.hpp	2000/08/10 18:43:05	1.15
  @@ -577,6 +577,15 @@
   	virtual void
   	setPrefix(const XalanDOMString&	prefix);
   
  +	virtual bool
  +	isIndexed() const;
  +
  +	virtual unsigned long
  +	getIndex() const;
  +
  +	virtual XalanDOMString
  +	getXSLTData() const;
  +
   	virtual XalanDOMString
   	getTagName() const;
   
  
  
  
  1.10      +1 -1      xml-xalan/c/src/XSLT/ElemValueOf.cpp
  
  Index: ElemValueOf.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemValueOf.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ElemValueOf.cpp	2000/07/06 20:19:25	1.9
  +++ ElemValueOf.cpp	2000/08/10 18:43:05	1.10
  @@ -176,7 +176,7 @@
   		}
   		else
   		{
  -			theValue = executionContext.getNodeData(*sourceNode);
  +			theValue = sourceNode->getXSLTData();
   		}
   
   		if(0 != executionContext.getTraceListeners())
  
  
  
  1.6       +15 -11    xml-xalan/c/src/XSLT/ExtensionNSHandler.cpp
  
  Index: ExtensionNSHandler.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ExtensionNSHandler.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ExtensionNSHandler.cpp	2000/05/29 22:34:32	1.5
  +++ ExtensionNSHandler.cpp	2000/08/10 18:43:05	1.6
  @@ -74,10 +74,14 @@
   
   
   
  -#include "XSLTProcessor.hpp"
  +#include "StylesheetExecutionContext.hpp"
   
   
   
  +class XSLTProcessor;
  +
  +
  +
   struct XSLProcessorContext
   {
   	const XSLTProcessor&	m_processor;
  @@ -241,13 +245,13 @@
    */
   void
   ExtensionNSHandler::processElement(
  -			const XalanDOMString&	localPart,
  -			const XalanElement*		/* element */,
  -			XSLTProcessor&			processor, 
  -			Stylesheet&				stylesheetTree, 
  -			const XalanNode*		sourceTree,
  -			const XalanNode*		sourceNode,
  -			const QName&			mode)
  +			StylesheetExecutionContext&		executionContext,
  +			const XalanDOMString&			localPart,
  +			const XalanElement*				/* element */,
  +			Stylesheet&						stylesheetTree, 
  +			const XalanNode*				sourceTree,
  +			const XalanNode*				sourceNode,
  +			const QName&					mode)
   {
   	const XObject*	result = 0;
   
  @@ -259,8 +263,8 @@
   
   			ExtensionFunctionHandler::ArgVector argv;
   			
  -			XSLProcessorContext xpc(processor,
  -					stylesheetTree, sourceTree, sourceNode, mode);
  +//			XSLProcessorContext xpc(processor,
  +//					stylesheetTree, sourceTree, sourceNode, mode);
   			/*
   				java:
   				Vector argv = new Vector (2);
  @@ -285,7 +289,7 @@
   
   	if (result != 0) 
   	{
  -		processor.outputToResultTree(*result);
  +		executionContext.outputToResultTree(*result);
   	}
   }
   
  
  
  
  1.5       +8 -9      xml-xalan/c/src/XSLT/ExtensionNSHandler.hpp
  
  Index: ExtensionNSHandler.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ExtensionNSHandler.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ExtensionNSHandler.hpp	2000/05/29 22:34:32	1.4
  +++ ExtensionNSHandler.hpp	2000/08/10 18:43:05	1.5
  @@ -80,7 +80,7 @@
   class Stylesheet;
   class XalanElement;
   class XalanNode;
  -class XSLTProcessor;
  +class StylesheetExecutionContext;
   
   
   
  @@ -169,7 +169,6 @@
   	 *
   	 * @param localPart      element name's local part
   	 * @param element        extension element being processed
  -	 * @param processor      handle to XSLTProcessor
   	 * @param stylesheetTree compiled stylesheet tree
   	 * @param mode           current mode
   	 * @param sourceTree     root of the source tree (but don't assume it's a
  @@ -184,13 +183,13 @@
   	 */
   	void
   	processElement (
  -			const XalanDOMString&	localPart,
  -			const XalanElement*		element,
  -			XSLTProcessor&			processor, 
  -			Stylesheet&				stylesheetTree, 
  -			const XalanNode*		sourceTree,
  -			const XalanNode*		sourceNode,
  -			const QName&			mode);
  +			StylesheetExecutionContext&		executionContext,
  +			const XalanDOMString&			localPart,
  +			const XalanElement*				element,
  +			Stylesheet&						stylesheetTree, 
  +			const XalanNode*				sourceTree,
  +			const XalanNode*				sourceNode,
  +			const QName&					mode);
   
   protected:
   
  
  
  
  1.11      +2 -2      xml-xalan/c/src/XSLT/FunctionDocument.cpp
  
  Index: FunctionDocument.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionDocument.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FunctionDocument.cpp	2000/07/28 22:02:20	1.10
  +++ FunctionDocument.cpp	2000/08/10 18:43:05	1.11
  @@ -214,7 +214,7 @@
   								arg->nodeset().item(i) != 0);
   
   			XalanDOMString	ref = XObject::eTypeNodeSet == arg->getType() ?
  -													executionContext.getNodeData(*arg->nodeset().item(i)) :
  +													arg->nodeset().item(i)->getXSLTData() :
   													arg->str();
   
   			// This is the case where the function was called with
  @@ -261,7 +261,7 @@
   
   				if(newDoc != 0)
   				{
  -					mnl->addNodeInDocOrder(newDoc, true);
  +					mnl->addNodeInDocOrder(newDoc, executionContext);
   				}
   			}
   		}
  
  
  
  1.3       +33 -5     xml-xalan/c/src/XSLT/FunctionGenerateID.cpp
  
  Index: FunctionGenerateID.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionGenerateID.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FunctionGenerateID.cpp	2000/04/11 15:09:27	1.2
  +++ FunctionGenerateID.cpp	2000/08/10 18:43:06	1.3
  @@ -58,6 +58,10 @@
   
   
   
  +#include <XalanDOM/XalanNode.hpp>
  +
  +
  +
   #include <PlatformSupport/DOMStringHelper.hpp>
   
   
  @@ -70,7 +74,9 @@
   
   
   FunctionGenerateID::FunctionGenerateID() :
  -	Function()
  +	Function(),
  +	m_prefix(XALAN_STATIC_UCODE_STRING("N")),
  +	m_prefixLength(length(m_prefix))
   {
   }
   
  @@ -82,6 +88,25 @@
   
   
   
  +const XalanDOMString
  +getSuffix(const XalanNode*	theNode)
  +{
  +	const unsigned long		theIndex = theNode->getIndex();
  +
  +	if (theIndex == 0)
  +	{
  +		// We're assuming here that each nodes has an implementation with a 
  +		// unique address that we can convert into a string
  +		return UnsignedLongToDOMString(unsigned long(theNode));
  +	}
  +	else
  +	{
  +		return UnsignedLongToDOMString(theIndex);
  +	}
  +}
  +
  +
  +
   XObject*
   FunctionGenerateID::execute(
   			XPathExecutionContext&			executionContext,
  @@ -101,14 +126,17 @@
   			theContext = 0;
   	}
   
  -	// We're assuming here that each nodes has an implementation with a 
  -	// unique address that we can convert into a string
  -
   	XalanDOMString id;
   
   	if (0 != theContext)
   	{
  -		id = XALAN_STATIC_UCODE_STRING("N") + LongToDOMString(reinterpret_cast<long>(theContext)); 		
  +		const XalanDOMString	theSuffix = getSuffix(theContext);
  +		assert(length(theSuffix) != 0);
  +
  +		reserve(id, m_prefixLength + length(theSuffix) + 1);
  +
  +		id += m_prefix;
  +		id += theSuffix;
   	}
   
   	return executionContext.getXObjectFactory().createString(id);
  
  
  
  1.4       +10 -1     xml-xalan/c/src/XSLT/FunctionGenerateID.hpp
  
  Index: FunctionGenerateID.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionGenerateID.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FunctionGenerateID.hpp	2000/04/11 15:09:27	1.3
  +++ FunctionGenerateID.hpp	2000/08/10 18:43:06	1.4
  @@ -62,6 +62,10 @@
   
   
   
  +#include <XalanDOM/XalanDOMString.hpp>
  +
  +
  +
   #include <XPath/Function.hpp>
   
   
  @@ -97,8 +101,13 @@
   
   	// Not implemented...
   	FunctionGenerateID&	operator=(const FunctionGenerateID&);
  +
  +	bool
  +	operator==(const FunctionGenerateID&) const;
  +
  +	const XalanDOMString	m_prefix;
   
  -	bool operator==(const FunctionGenerateID&) const;
  +	const unsigned int		m_prefixLength;
   };
   
   
  
  
  
  1.7       +3 -4      xml-xalan/c/src/XSLT/FunctionKey.cpp
  
  Index: FunctionKey.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionKey.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FunctionKey.cpp	2000/07/28 22:02:21	1.6
  +++ FunctionKey.cpp	2000/08/10 18:43:06	1.7
  @@ -166,8 +166,7 @@
   				{
   					assert(theNodeSet.item(i) != 0);
   
  -					const XalanDOMString		ref =
  -							executionContext.getNodeData(*theNodeSet.item(i));
  +					const XalanDOMString		ref = theNodeSet.item(i)->getXSLTData();
   
   					if(0 != length(ref))
   					{
  @@ -183,7 +182,7 @@
   											*executionContext.getPrefixResolver());
   							assert(nl != 0);
   
  -							theNodeRefList->addNodesInDocOrder(*nl);
  +							theNodeRefList->addNodesInDocOrder(*nl, executionContext);
   						}
   					}
   				}
  @@ -201,7 +200,7 @@
   
   			if (nl != 0)
   			{
  -				theNodeRefList->addNodesInDocOrder(*nl);
  +				theNodeRefList->addNodesInDocOrder(*nl, executionContext);
   			}
   		}
   
  
  
  
  1.8       +1 -1      xml-xalan/c/src/XSLT/KeyTable.cpp
  
  Index: KeyTable.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/KeyTable.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- KeyTable.cpp	2000/07/25 14:50:36	1.7
  +++ KeyTable.cpp	2000/08/10 18:43:06	1.8
  @@ -188,7 +188,7 @@
   									XalanNode* const	useNode = nl->item(k);
   									assert(useNode != 0);
   
  -									exprResult = executionContext.getNodeData(*useNode);
  +									exprResult = useNode->getXSLTData();
   								}
   
   								MutableNodeRefList&		keyNodes =
  
  
  
  1.29      +27 -0     xml-xalan/c/src/XSLT/Stylesheet.cpp
  
  Index: Stylesheet.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/Stylesheet.cpp,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Stylesheet.cpp	2000/08/07 19:52:05	1.28
  +++ Stylesheet.cpp	2000/08/10 18:43:07	1.29
  @@ -1680,6 +1680,22 @@
   
   
   
  +unsigned long
  +Stylesheet::getIndex() const
  +{
  +	return 0;
  +}
  +
  +
  +
  +XalanDOMString
  +Stylesheet::getXSLTData() const
  +{
  +	return DOMString();
  +}
  +
  +
  +
   XalanElement*
   Stylesheet::createElement(const XalanDOMString& 	/* tagName */)
   {
  @@ -1866,6 +1882,17 @@
   	assert(false);	
   
   	return 0;
  +}
  +
  +
  +
  +bool
  +Stylesheet::isIndexed() const
  +{
  +	//should not be called
  +	assert(false);	
  +
  +	return false;
   }
   
   
  
  
  
  1.20      +9 -0      xml-xalan/c/src/XSLT/Stylesheet.hpp
  
  Index: Stylesheet.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/Stylesheet.hpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Stylesheet.hpp	2000/08/07 19:52:06	1.19
  +++ Stylesheet.hpp	2000/08/10 18:43:09	1.20
  @@ -1040,6 +1040,12 @@
   	virtual void
   	setPrefix(const XalanDOMString& prefix);
   
  +	virtual unsigned long
  +	getIndex() const;
  +
  +	virtual XalanDOMString
  +	getXSLTData() const;
  +
   	virtual XalanElement*
   	createElement(const XalanDOMString& tagName);
   
  @@ -1100,6 +1106,9 @@
   
   	virtual XalanElement*
   	getElementById(const XalanDOMString&	elementId) const;
  +
  +	virtual bool
  +	isIndexed() const;
   
   	// These interfaces are inherited from PrefixResolver...
   
  
  
  
  1.9       +0 -6      xml-xalan/c/src/XSLT/StylesheetConstructionContextDefault.cpp
  
  Index: StylesheetConstructionContextDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetConstructionContextDefault.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StylesheetConstructionContextDefault.cpp	2000/07/31 02:44:12	1.8
  +++ StylesheetConstructionContextDefault.cpp	2000/08/10 18:43:10	1.9
  @@ -86,12 +86,10 @@
   StylesheetConstructionContextDefault::StylesheetConstructionContextDefault(
   			XSLTEngineImpl&		processor,
   			XPathEnvSupport&	xpathEnvSupport,
  -			XObjectFactory&		xobjectFactory,
   			XPathFactory&		xpathFactory) :
   	StylesheetConstructionContext(),
   	m_processor(processor),
   	m_xpathEnvSupport(xpathEnvSupport),
  -	m_xobjectFactory(xobjectFactory),
   	m_xpathFactory(xpathFactory),
   	m_xpathProcessor(new XPathProcessorImpl),
   	m_stylesheets()
  @@ -153,8 +151,6 @@
   
   	m_stylesheets.clear();
   
  -	m_xobjectFactory.reset();
  -
   	m_xpathFactory.reset();
   }
   
  @@ -264,7 +260,6 @@
   	m_xpathProcessor->initMatchPattern(*xpath,
   									   str,
   									   resolver,
  -									   m_xobjectFactory,
   									   m_xpathEnvSupport);
   
   	return xpath;
  @@ -282,7 +277,6 @@
   	m_xpathProcessor->initXPath(*xpath,
   								str,
   								resolver,
  -								m_xobjectFactory,
   								m_xpathEnvSupport);
   
   	return xpath;
  
  
  
  1.10      +0 -4      xml-xalan/c/src/XSLT/StylesheetConstructionContextDefault.hpp
  
  Index: StylesheetConstructionContextDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetConstructionContextDefault.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StylesheetConstructionContextDefault.hpp	2000/06/23 02:39:33	1.9
  +++ StylesheetConstructionContextDefault.hpp	2000/08/10 18:43:11	1.10
  @@ -77,7 +77,6 @@
   
   
   
  -class XObjectFactory;
   class XPathEnvSupport;
   class XPathFactory;
   class XPathProcessor;
  @@ -104,14 +103,12 @@
   	 *
   	 * @param processor a reference to an XSLTEngineImpl instance.  Used for error reporting.
   	 * @param xpathEnvSupport a reference to an XPathEnvSupport instance.
  -	 * @param xobjectFactory a reference to an XObjectFactory instance.  See comments above for important details.
   	 * @param xpathFactory a reference to an XPathFactory instance.  See comments above for important details.
   	 *
   	 */
   	StylesheetConstructionContextDefault(
   			XSLTEngineImpl&		processor,
   			XPathEnvSupport&	xpathEnvSupport,
  -			XObjectFactory&		xobjectFactory,
   			XPathFactory&		xpathFactory);
   
   	virtual
  @@ -208,7 +205,6 @@
   
   	XSLTEngineImpl&						m_processor;
   	XPathEnvSupport&					m_xpathEnvSupport;
  -	XObjectFactory&						m_xobjectFactory;
   	XPathFactory&						m_xpathFactory;
   
   #if defined(XALAN_NO_NAMESPACES)
  
  
  
  1.25      +33 -18    xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp
  
  Index: StylesheetExecutionContext.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- StylesheetExecutionContext.hpp	2000/07/28 22:02:21	1.24
  +++ StylesheetExecutionContext.hpp	2000/08/10 18:43:11	1.25
  @@ -602,7 +602,7 @@
   	 * @param resolver    resolver for namespace resolution
   	 * @return pointer to resulting XObject
   	 */
  -	virtual XObject*
  +	virtual const XObject*
   	executeXPath(
   			const XalanDOMString&	str,
   			XalanNode*				contextNode,
  @@ -616,7 +616,7 @@
   	 * @param resolver resolver for namespace resolution
   	 * @return pointer to resulting XPath
   	 */
  -	virtual XPath*
  +	virtual const XPath*
   	createMatchPattern(
   			const XalanDOMString&	str,
   			const PrefixResolver&	resolver) = 0;
  @@ -627,7 +627,7 @@
   	 * @param xpath The XPath to return.
   	 */
   	virtual void
  -	returnXPath(XPath*	xpath) = 0;
  +	returnXPath(const XPath*	xpath) = 0;
   
   	// A helper class to automatically return an XPath instance.
   	class XPathGuard
  @@ -636,7 +636,7 @@
   
   		XPathGuard(
   				StylesheetExecutionContext&		context,
  -				XPath*							xpath = 0) :
  +				const XPath*					xpath = 0) :
   			m_context(context),
   			m_xpath(xpath)
   		{
  @@ -650,16 +650,16 @@
   			}
   		}
   
  -		XPath*
  +		const XPath*
   		get() const
   		{
   			return m_xpath;
   		}
   
  -		XPath*
  +		const XPath*
   		release()
   		{
  -			XPath* const	temp = m_xpath;
  +			const XPath* const	temp = m_xpath;
   
   			m_xpath = 0;
   
  @@ -667,7 +667,7 @@
   		}
   
   		void
  -		reset(XPath*	xpath)
  +		reset(const XPath*	xpath)
   		{
   			if (m_xpath != 0)
   			{
  @@ -681,7 +681,7 @@
   
   		StylesheetExecutionContext&		m_context;
   
  -		XPath*							m_xpath;
  +		const XPath*					m_xpath;
   	};
   
   	/**
  @@ -723,7 +723,7 @@
   	 * @param resolver    resolver for namespace resolution
   	 * @return a pointer to the XObject result
   	 */
  -	virtual XObject*
  +	virtual const XObject*
   	createVariable(
   			const ElemTemplateElement*	element,
   			const XPath&				xpath,
  @@ -741,7 +741,7 @@
   	 * @param sourceNode source node
   	 * @return a pointer to the XObject result
   	 */
  -	virtual XObject*
  +	virtual const XObject*
   	createVariable(
   			const ElemTemplateElement*	element,
   			const ElemTemplateElement&	templateChild,
  @@ -816,7 +816,7 @@
   	virtual void
   	pushVariable(
   			const QName&				name,
  -			XObject*					var,
  +			const XObject*				var,
   			const ElemTemplateElement*	element) = 0;
   
   	/**
  @@ -869,7 +869,7 @@
   	 * @param theName name of variable
   	 * @return pointer to XObject for variable
   	 */
  -	virtual XObject*
  +	virtual const XObject*
   	getParamVariable(const QName&	theName) const = 0;
   
   	/**
  @@ -1164,7 +1164,7 @@
   	 * @param sourceNode source node
   	 * @return XObject instance
   	 */
  -	virtual XObject*
  +	virtual const XObject*
   	createXResultTreeFrag(
   			const ElemTemplateElement&	templateChild,
   			XalanNode*					sourceTree,
  @@ -1179,7 +1179,7 @@
   	 * @param mode current mode
   	 * @return XObject instance
   	 */
  -	virtual XObject*
  +	virtual const XObject*
   	createXResultTreeFrag(
   			const ElemTemplateElement&	templateChild,
   			XalanNode*					sourceTree,
  @@ -1195,9 +1195,18 @@
   	 * @return true if the object was destroyed.
   	 */
   	virtual bool
  -	destroyXObject(XObject*		theXObject) const = 0;
  +	destroyXObject(const XObject*	theXObject) const = 0;
   
   	/**
  +	 * Output an object to the result tree by doing the right conversions.
  +	 * This is public for access by extensions.
  +	 *
  +	 * @param obj the XObject to output
  +	 */
  +	virtual void
  +	outputToResultTree(const XObject&	xobj) = 0;
  +
  +	/**
   	 * Given a result tree fragment, walk the tree and
   	 * output it to the result stream.
   	 *
  @@ -1491,6 +1500,9 @@
   	virtual XObjectFactory&
   	getXObjectFactory() const = 0;
   
  +	virtual bool
  +	isIgnorableWhitespace(const XalanText&	node) const = 0;
  +
   	virtual XalanDOMString
   	getNamespaceOfNode(const XalanNode&		n) const = 0;
   
  @@ -1544,7 +1556,7 @@
   	virtual void
   	popArgVector() = 0;
   
  -	virtual XObject*
  +	virtual const XObject*
   	extFunction(
   			const XalanDOMString&			theNamespace,
   			const XalanDOMString&			functionName,
  @@ -1596,7 +1608,7 @@
   			const XalanDOMString&	ref,
   			const PrefixResolver&	resolver) = 0;
   
  -	virtual XObject*
  +	virtual const XObject*
   	getVariable(const QName&	name) const = 0;
   
   	virtual const PrefixResolver*
  @@ -1610,6 +1622,9 @@
   
   	virtual XalanDOMString
   	findURIFromDoc(const XalanDocument*		owner) const = 0;
  +
  +	virtual XalanDocument*
  +	getDOMFactory() const = 0;
   
   	virtual XalanDOMString
   	getUnparsedEntityURI(
  
  
  
  1.26      +45 -21    xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp
  
  Index: StylesheetExecutionContextDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- StylesheetExecutionContextDefault.cpp	2000/08/07 19:52:06	1.25
  +++ StylesheetExecutionContextDefault.cpp	2000/08/10 18:43:11	1.26
  @@ -438,7 +438,7 @@
   
   
   
  -XObject*
  +const XObject*
   StylesheetExecutionContextDefault::executeXPath(
   			const XalanDOMString&	str,
   			XalanNode*				contextNode,
  @@ -452,12 +452,12 @@
   
   
   
  -XPath*
  +const XPath*
   StylesheetExecutionContextDefault::createMatchPattern(
   			const XalanDOMString&	str,
   			const PrefixResolver&	resolver)
   {
  -	XPath*	theResult = 0;
  +	const XPath*	theResult = 0;
   
   	// We won't cache any xpath that has a namespace, since
   	// we have no idea how that might be resolved.  We could
  @@ -500,7 +500,7 @@
   
   
   void
  -StylesheetExecutionContextDefault::returnXPath(XPath*	xpath)
  +StylesheetExecutionContextDefault::returnXPath(const XPath*		xpath)
   {
   	if (isCached(xpath) == false)
   	{
  @@ -534,14 +534,14 @@
   
   
   
  -XObject*
  +const XObject*
   StylesheetExecutionContextDefault::createVariable(
   			const ElemTemplateElement*	/* element */,
   			const XPath&				xpath,
   			XalanNode*					contextNode,
   			const PrefixResolver&		resolver)
   {
  -	XObject* const	theVariable =
  +	const XObject* const	theVariable =
   		xpath.execute(contextNode, resolver, *this);
   
   	assert(m_liveVariablesStack.empty() == false);
  @@ -555,7 +555,7 @@
   
   
   
  -XObject*
  +const XObject*
   StylesheetExecutionContextDefault::createVariable(
   			const ElemTemplateElement*	/* element */,
   			const ElemTemplateElement&	templateChild,
  @@ -563,8 +563,8 @@
   			XalanNode*					sourceNode,
   			const QName&				mode)
   {
  -	XObject* const	theVariable =
  -		this->createXResultTreeFrag(templateChild, sourceTree, sourceNode, mode);
  +	const XObject* const	theVariable =
  +		createXResultTreeFrag(templateChild, sourceTree, sourceNode, mode);
   
   	// We'll want to return this variable after the current element frame
   	// has finished executing, so save this off for later...
  @@ -583,7 +583,7 @@
   			XalanNode*					contextNode,
   			const PrefixResolver&		resolver)
   {
  -	XObject*	var = 0;
  +	const XObject*	var = 0;
   
   	if (length(str) > 0)
   	{
  @@ -604,7 +604,7 @@
   void
   StylesheetExecutionContextDefault::pushVariable(
   			const QName&				name,
  -			XObject*					var,
  +			const XObject*				var,
   			const ElemTemplateElement*	element)
   {
   	m_variablesStack.pushVariable(name, var, element);
  @@ -756,7 +756,7 @@
   
   				const XPath* const	pxpath = xslParamElement->getSelectPattern();
   
  -				XObject*			theXObject = 0;
  +				const XObject*	theXObject = 0;
   
   				if(0 != pxpath)
   				{
  @@ -791,7 +791,7 @@
   
   
   
  -XObject*
  +const XObject*
   StylesheetExecutionContextDefault::getParamVariable(const QName&	theName) const
   {
   	return m_variablesStack.getParamVariable(theName);
  @@ -937,7 +937,7 @@
   
   
   
  -XObject*
  +const XObject*
   StylesheetExecutionContextDefault::createXResultTreeFrag(
   			const ElemTemplateElement&	templateChild,
   			XalanNode*					sourceTree,
  @@ -951,7 +951,7 @@
   
   
   
  -XObject*
  +const XObject*
   StylesheetExecutionContextDefault::createXResultTreeFrag(
   			const ElemTemplateElement&	templateChild,
   			XalanNode*					sourceTree,
  @@ -975,7 +975,7 @@
   
   
   bool
  -StylesheetExecutionContextDefault::destroyXObject(XObject*	theXObject) const
  +StylesheetExecutionContextDefault::destroyXObject(const XObject*	theXObject) const
   {
   	return getXObjectFactory().returnObject(theXObject);
   }
  @@ -983,9 +983,17 @@
   
   
   void
  +StylesheetExecutionContextDefault::outputToResultTree(const XObject&	xobj)
  +{
  +	m_xsltProcessor.outputToResultTree(*this, xobj);
  +}
  +
  +
  +
  +void
   StylesheetExecutionContextDefault::outputResultTreeFragment(const XObject&	theTree)
   {
  -	m_xsltProcessor.outputResultTreeFragment(theTree);
  +	m_xsltProcessor.outputResultTreeFragment(*this, theTree);
   }
   
   
  @@ -1332,6 +1340,14 @@
   
   
   
  +bool
  +StylesheetExecutionContextDefault::isIgnorableWhitespace(const XalanText&	node) const
  +{
  +	return m_xpathExecutionContextDefault.isIgnorableWhitespace(node);
  +}
  +
  +
  +
   XalanDOMString
   StylesheetExecutionContextDefault::getNamespaceOfNode(const XalanNode&	n) const
   {
  @@ -1469,7 +1485,7 @@
   
   
   
  -XObject*
  +const XObject*
   StylesheetExecutionContextDefault::extFunction(
   			const XalanDOMString&			theNamespace,
   			const XalanDOMString&			functionName,
  @@ -1576,10 +1592,10 @@
   
   
   
  -XObject*
  +const XObject*
   StylesheetExecutionContextDefault::getVariable(const QName&		name) const
   {
  -	XObject* const	theVariable =
  +	const XObject* const	theVariable =
   		m_variablesStack.getVariable(name);
   
   	return m_xpathExecutionContextDefault.getXObjectFactory().clone(*theVariable);
  @@ -1611,6 +1627,14 @@
   
   
   
  +XalanDocument*
  +StylesheetExecutionContextDefault::getDOMFactory() const
  +{
  +	return m_xpathExecutionContextDefault.getDOMFactory();
  +}
  +
  +
  +
   XalanDOMString
   StylesheetExecutionContextDefault::findURIFromDoc(const XalanDocument*	owner) const
   {
  @@ -1951,7 +1975,7 @@
   void
   StylesheetExecutionContextDefault::addToXPathCache(
   			const XalanDOMString&	pattern,
  -			XPath*					theXPath)
  +			const XPath*			theXPath)
   {
   	clock_t		addClock = clock();
   
  
  
  
  1.24      +24 -15    xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp
  
  Index: StylesheetExecutionContextDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- StylesheetExecutionContextDefault.hpp	2000/08/07 19:52:06	1.23
  +++ StylesheetExecutionContextDefault.hpp	2000/08/10 18:43:11	1.24
  @@ -207,19 +207,19 @@
   	getIndent() const;
   
   	// $$$ ToDo: Get rid of this!!!!
  -	virtual XObject*
  +	virtual const XObject*
   	executeXPath(
   			const XalanDOMString&	str,
   			XalanNode*				contextNode,
   			const XalanElement&		resolver);
   
  -	virtual XPath*
  +	virtual const XPath*
   	createMatchPattern(
   			const XalanDOMString&	str,
   			const PrefixResolver&	resolver);
   
   	virtual void
  -	returnXPath(XPath*	xpath);
  +	returnXPath(const XPath*	xpath);
   
   	virtual const XalanDOMString
   	evaluateAttrVal(
  @@ -230,14 +230,14 @@
   	virtual void
   	pushTopLevelVariables(const ParamVectorType&	topLevelParams);
   
  -	virtual XObject*
  +	virtual const XObject*
   	createVariable(
   			const ElemTemplateElement*	element,
   			const XPath&				xpath,
   			XalanNode*					contextNode,
   			const PrefixResolver&		resolver);
   
  -	virtual XObject*
  +	virtual const XObject*
   	createVariable(
   			const ElemTemplateElement*	element,
   			const ElemTemplateElement&	templateChild,
  @@ -256,7 +256,7 @@
   	virtual void
   	pushVariable(
   			const QName&				name,
  -			XObject*					var,
  +			const XObject*				var,
   			const ElemTemplateElement*	element);
   
   	virtual void
  @@ -295,7 +295,7 @@
   			const QName&				mode,
   			const ElemTemplateElement*	targetTemplate);
   
  -	virtual XObject*
  +	virtual const XObject*
   	getParamVariable(const QName&	theName) const;
   
   	virtual void
  @@ -352,13 +352,13 @@
   			bool		overrideStrip,
   			bool		shouldCloneAttributes);
   
  -	virtual XObject*
  +	virtual const XObject*
   	createXResultTreeFrag(
   			const ElemTemplateElement&	templateChild,
   			XalanNode*					sourceTree,
   			XalanNode*					sourceNode);
   
  -	virtual XObject*
  +	virtual const XObject*
   	createXResultTreeFrag(
   			const ElemTemplateElement&	templateChild,
   			XalanNode*					sourceTree,
  @@ -366,9 +366,12 @@
   			const QName&				mode);
   
   	virtual bool
  -	destroyXObject(XObject*		theXObject) const;
  +	destroyXObject(const XObject*	theXObject) const;
   
   	virtual void
  +	outputToResultTree(const XObject&	xobj);
  +
  +	virtual void
   	outputResultTreeFragment(const XObject&		theTree);
   
   	virtual const XalanDOMString&
  @@ -536,6 +539,9 @@
   	virtual XObjectFactory&
   	getXObjectFactory() const;
   
  +	virtual bool
  +	isIgnorableWhitespace(const XalanText&	node) const;
  +
   	virtual XalanDOMString
   	getNamespaceOfNode(const XalanNode&		n) const;
   
  @@ -589,7 +595,7 @@
   	virtual void
   	popArgVector();
   
  -	virtual XObject*
  +	virtual const XObject*
   	extFunction(
   			const XalanDOMString&			theNamespace,
   			const XalanDOMString&			functionName,
  @@ -641,7 +647,7 @@
   			const XalanDOMString&	ref,
   			const PrefixResolver&	resolver);
   
  -	virtual XObject*
  +	virtual const XObject*
   	getVariable(const QName&	name) const;
   
   	virtual const PrefixResolver*
  @@ -656,6 +662,9 @@
   	virtual XalanDOMString
   	findURIFromDoc(const XalanDocument*		owner) const;
   
  +	virtual XalanDocument*
  +	getDOMFactory() const;
  +
   	virtual XalanDOMString
   	getUnparsedEntityURI(
   			const XalanDOMString&	theName,
  @@ -762,7 +771,7 @@
   	void
   	addToXPathCache(
   			const XalanDOMString&	pattern,
  -			XPath*					theXPath);
  +			const XPath*			theXPath);
   
   
   	XPathExecutionContextDefault	m_xpathExecutionContextDefault;
  @@ -779,7 +788,7 @@
   	typedef set<TextOutputStream*>						TextOutputStreamSetType;
   	typedef vector<const XObject*>						VariablesCollectionType;
   	typedef vector<VariablesCollectionType>				LiveVariablesStackType;
  -	typedef pair<XPath*, clock_t>						XPathCacheEntry;
  +	typedef pair<const XPath*, clock_t>					XPathCacheEntry;
   	typedef map<XalanDOMString,
   				XPathCacheEntry,
   				less<XalanDOMString> >					XPathCacheMapType;
  @@ -790,7 +799,7 @@
   	typedef std::set<TextOutputStream*>					TextOutputStreamSetType;
   	typedef std::vector<const XObject*>					VariablesCollectionType;
   	typedef std::vector<VariablesCollectionType>		LiveVariablesStackType;
  -	typedef std::pair<XPath*, clock_t>					XPathCacheEntry;
  +	typedef std::pair<const XPath*, clock_t>			XPathCacheEntry;
   	typedef std::map<XalanDOMString, XPathCacheEntry>	XPathCacheMapType;
   #endif
   
  
  
  
  1.3       +1 -1      xml-xalan/c/src/XSLT/TraceListenerDefault.cpp
  
  Index: TraceListenerDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/TraceListenerDefault.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TraceListenerDefault.cpp	2000/06/05 01:19:10	1.2
  +++ TraceListenerDefault.cpp	2000/08/10 18:43:11	1.3
  @@ -250,7 +250,7 @@
   				for(unsigned int i = 0; i < n; i++)
   				{
   					m_printWriter.print(XALAN_STATIC_UCODE_STRING("     "));
  -					m_printWriter.println(DOMServices::getNodeData(*nl.item(i)));
  +					m_printWriter.println(nl.item(i)->getXSLTData());
   				}
   			}
   		}
  
  
  
  1.4       +4 -4      xml-xalan/c/src/XSLT/VariablesStack.cpp
  
  Index: VariablesStack.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/VariablesStack.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- VariablesStack.cpp	2000/07/25 14:54:33	1.3
  +++ VariablesStack.cpp	2000/08/10 18:43:12	1.4
  @@ -321,7 +321,7 @@
   void
   VariablesStack::pushVariable(
   			const QName&				name,
  -			XObject*					val,
  +			const XObject*				val,
   			const ElemTemplateElement*	e)
   {
   	if(elementFrameAlreadyPushed(e) == false)
  @@ -351,12 +351,12 @@
   
   
   
  -XObject*
  +const XObject*
   VariablesStack::findXObject(
   			const QName&	name,
   			bool			fSearchGlobalSpace) const
   {
  -	XObject*		theXObject = 0;
  +	const XObject*		theXObject = 0;
   
   	const StackEntry*	theVariable = findVariable(name, fSearchGlobalSpace);
   
  @@ -508,7 +508,7 @@
   
   VariablesStack::StackEntry::StackEntry(
   		const QName*	name,
  -		XObject*		val) :
  +		const XObject*	val) :
   	m_type(eVariable)
   {
   	variable.m_qname = name;
  
  
  
  1.3       +9 -9      xml-xalan/c/src/XSLT/VariablesStack.hpp
  
  Index: VariablesStack.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/VariablesStack.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VariablesStack.hpp	2000/07/25 14:54:33	1.2
  +++ VariablesStack.hpp	2000/08/10 18:43:12	1.3
  @@ -140,9 +140,9 @@
   	popContextMarker();
   
   #if defined(XALAN_NO_NAMESPACES)
  -	typedef vector<pair<const QName*, XObject*> >				ParamsVectorType;
  +	typedef vector<pair<const QName*, const XObject*> >				ParamsVectorType;
   #else
  -	typedef std::vector<std::pair<const QName*, XObject*> >		ParamsVectorType;
  +	typedef std::vector<std::pair<const QName*, const XObject*> >	ParamsVectorType;
   #endif
   
   	/**
  @@ -164,7 +164,7 @@
   	 * @param theName name of variable
   	 * @return pointer to XObject for variable
   	 */
  -	XObject*
  +	const XObject*
   	getParamVariable(const QName& qname) const
   	{
   		return findXObject(qname, false);
  @@ -176,7 +176,7 @@
   	 * @param qname name of variable
   	 * @return pointer to the corresponding XObject
   	 */
  -	XObject*
  +	const XObject*
   	getVariable(const QName& 	name) const
   	{
   		return findXObject(name, true);
  @@ -194,7 +194,7 @@
   	void
   	pushVariable(
   			const QName&				name,
  -			XObject*					val,
  +			const XObject*				val,
   			const ElemTemplateElement*	e);
   
   	/**
  @@ -321,7 +321,7 @@
   		 */
   		StackEntry(
   			const QName*	name,
  -			XObject*		val);
  +			const XObject*	val);
   
   		/**
   		 * Construct an element frame marker.
  @@ -366,7 +366,7 @@
   		 * 
   		 * @return pointer to XObject
   		 */
  -		XObject*
  +		const XObject*
   		getVariable() const
   		{
   			return variable.m_value;
  @@ -400,7 +400,7 @@
   			{
   				const QName*				m_qname;
   
  -				XObject*					m_value;
  +				const XObject*				m_value;
   			} variable;
   
   			struct
  @@ -419,7 +419,7 @@
   	enum { eDefaultStackSize = 100 };
   
   
  -	XObject*
  +	const XObject*
   	findXObject(
   			const QName&	name,
   			bool			fSearchGlobalSpace) const;
  
  
  
  1.55      +31 -24    xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp
  
  Index: XSLTEngineImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- XSLTEngineImpl.cpp	2000/08/08 16:29:06	1.54
  +++ XSLTEngineImpl.cpp	2000/08/10 18:43:12	1.55
  @@ -972,9 +972,11 @@
   
   
   void
  -XSLTEngineImpl::outputToResultTree(const XObject&	value)
  +XSLTEngineImpl::outputToResultTree(
  +			StylesheetExecutionContext&		executionContext,
  +			const XObject&					value)
   {
  -	const int	type = value.getType();
  +	const XObject::eObjectType	type = value.getType();
   
   	XalanDOMString s;
   
  @@ -1041,7 +1043,7 @@
   		break;
   		
   	case XObject::eTypeResultTreeFrag:
  -		outputResultTreeFragment(value);
  +		outputResultTreeFragment(executionContext, value);
   		break;
   
   	case XObject::eTypeNull:
  @@ -1934,9 +1936,10 @@
   
   			if(stripWhiteSpace == true)
   			{
  -				if(!m_xpathSupport.isIgnorableWhitespace(tx))
  +				if(tx.isIgnorableWhitespace())
   				{
   					data = getNormalizedText(tx);
  +
   					if((0 != length(data)) && (0 == length(trim(data))))
   					{
   						clear(data);
  @@ -1967,7 +1970,7 @@
   				// if the node after that is a ignorable text node, append 
   				// it to the text node just added.
   			  
  -				if(m_xpathSupport.isIgnorableWhitespace(tx))
  +				if(tx.isIgnorableWhitespace())
   				{
   					ignorableWhitespace(toCharArray(data), length(data));
   				}
  @@ -2103,9 +2106,11 @@
   
   
   void
  -XSLTEngineImpl::outputResultTreeFragment(const XObject&		theTree)
  +XSLTEngineImpl::outputResultTreeFragment(
  +			StylesheetExecutionContext&		executionContext,
  +			const XObject&					theTree)
   {
  -	const ResultTreeFragBase&	docFrag = theTree.rtree();
  +	const ResultTreeFragBase&	docFrag = theTree.rtree(executionContext);
   
   	const XalanNodeList*		nl = docFrag.getChildNodes();
   	assert(nl != 0);
  @@ -2393,18 +2398,19 @@
   
   
   
  -XObject*
  +const XObject*
   XSLTEngineImpl::evalXPathStr(
   			const XalanDOMString&	str,
   			XPathExecutionContext&	executionContext)
   {
  -	XPathGuard	theXPath(m_xpathFactory,
  -						 m_xpathFactory.create());
  +	XPath* const	theXPath = m_xpathFactory.create();
   
  -    m_xpathProcessor->initXPath(*theXPath.get(),
  +	XPathGuard	theGuard(m_xpathFactory,
  +						 theXPath);
  +
  +    m_xpathProcessor->initXPath(*theXPath,
   								str,
   								*executionContext.getPrefixResolver(),
  -								m_xobjectFactory,
   								m_xpathEnvSupport);
   
       return theXPath->execute(executionContext.getCurrentNode(),
  @@ -2414,20 +2420,21 @@
   
   
   
  -XObject*
  +const XObject*
   XSLTEngineImpl::evalXPathStr(
   			const XalanDOMString&	str,
   			XalanNode*				contextNode,
   			const PrefixResolver&	prefixResolver,
   			XPathExecutionContext&	executionContext)
   {
  -	XPathGuard	theXPath(m_xpathFactory,
  -						 m_xpathFactory.create());
  +	XPath* const	theXPath = m_xpathFactory.create();
  +
  +	XPathGuard	theGuard(m_xpathFactory,
  +						 theXPath);
   
  -    m_xpathProcessor->initXPath(*theXPath.get(),
  +    m_xpathProcessor->initXPath(*theXPath,
   								str,
   								prefixResolver,
  -								m_xobjectFactory,
   								m_xpathEnvSupport);
   
       return theXPath->execute(contextNode, prefixResolver, executionContext);
  @@ -2435,7 +2442,7 @@
   
   
   
  -XObject*
  +const XObject*
   XSLTEngineImpl::evalXPathStr(
   			const XalanDOMString&	str,
   			XalanNode*				contextNode,
  @@ -2455,14 +2462,14 @@
   /**
    * Create and initialize an xpath and return it.
    */
  -XPath*
  +const XPath*
   XSLTEngineImpl::createMatchPattern(
   			const XalanDOMString&	str,
   			const PrefixResolver&	resolver)
   {
   	XPath* const	xpath = m_xpathFactory.create();
   
  -	m_xpathProcessor->initMatchPattern(*xpath, str, resolver, m_xobjectFactory, m_xpathEnvSupport);
  +	m_xpathProcessor->initMatchPattern(*xpath, str, resolver, m_xpathEnvSupport);
   
   	return xpath;
   }
  @@ -2470,7 +2477,7 @@
   
   
   void
  -XSLTEngineImpl::returnXPath(XPath*	xpath)
  +XSLTEngineImpl::returnXPath(const XPath*	xpath)
   {
   	m_xpathFactory.returnObject(xpath);
   }
  @@ -2782,7 +2789,7 @@
   			const XalanText& 	theTextNode =
   					static_cast<const XalanText&>(textNode);
   
  -			if(!m_xpathSupport.isIgnorableWhitespace(theTextNode))
  +			if(!theTextNode.isIgnorableWhitespace())
   			{
   				const XalanDOMString	data = theTextNode.getData();
   
  @@ -3107,7 +3114,7 @@
    */
   ResultTreeFragBase* XSLTEngineImpl::createDocFrag() const
   {
  -	return new ResultTreeFrag(*getDOMFactory(), m_xpathSupport);
  +	return new ResultTreeFrag(*getDOMFactory());
   }
     
   
  @@ -3133,7 +3140,7 @@
   ResultTreeFragBase*
   XSLTEngineImpl::createResultTreeFrag() const
   {
  -	return new ResultTreeFrag(*getDOMFactory(), m_xpathSupport);
  +	return new ResultTreeFrag(*getDOMFactory());
   }
   
   
  
  
  
  1.42      +11 -7     xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp
  
  Index: XSLTEngineImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- XSLTEngineImpl.hpp	2000/08/01 19:43:27	1.41
  +++ XSLTEngineImpl.hpp	2000/08/10 18:43:12	1.42
  @@ -229,7 +229,9 @@
   	getSourceTreeFromInput(XSLTInputSource&		inputSource);
   
   	virtual void
  -	outputToResultTree(const XObject&	xobj);
  +	outputToResultTree(
  +			StylesheetExecutionContext&		executionContext,
  +			const XObject&					xobj);
   
   	virtual void
   	resetCurrentState(
  @@ -534,7 +536,9 @@
   	 * @param theTree result tree fragment
   	 */
   	void
  -	outputResultTreeFragment(const XObject& 	theTree);
  +	outputResultTreeFragment(
  +			StylesheetExecutionContext&		executionContext,
  +			const XObject& 					theTree);
   
   	/**
   	 * Retrieve the root stylesheet.
  @@ -824,7 +828,7 @@
   	 * @param resolver resolver for namespace resolution
   	 * @return pointer to XPath created
   	 */
  -	XPath*
  +	const XPath*
   	createMatchPattern(
   			const XalanDOMString&	str,
   			const PrefixResolver&	resolver);
  @@ -836,7 +840,7 @@
   	 * @param xpath	   The XPath to return.
   	 */
   	void
  -	returnXPath(XPath*	xpath);
  +	returnXPath(const XPath*	xpath);
   
   	/**
   	 * Copy XMLNS: attributes in if not already in scope.
  @@ -856,7 +860,7 @@
   	 * @param executionContext current execution context
   	 * @return pointer to XObject result
   	 */
  -	XObject*
  +	const XObject*
   	evalXPathStr(
   			const XalanDOMString&	str,
   			XPathExecutionContext&	executionContext);
  @@ -870,7 +874,7 @@
   	 * @param executionContext current execution context
   	 * @return pointer to XObject result
   	 */
  -	XObject*
  +	const XObject*
   	evalXPathStr(
   			const XalanDOMString&	str,
   			XalanNode* 				contextNode,
  @@ -886,7 +890,7 @@
   	 * @param executionContext current execution context
   	 * @return pointer to XObject result
   	 */
  -	XObject*
  +	const XObject*
   	evalXPathStr(
   			const XalanDOMString&	str,
   			XalanNode* 				contextNode,
  
  
  
  1.14      +4 -1      xml-xalan/c/src/XSLT/XSLTProcessor.hpp
  
  Index: XSLTProcessor.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessor.hpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XSLTProcessor.hpp	2000/07/28 22:02:21	1.13
  +++ XSLTProcessor.hpp	2000/08/10 18:43:12	1.14
  @@ -209,10 +209,13 @@
   	* Output an object to the result tree by doing the right conversions.
   	* This is public for access by extensions.
   	*
  +	* @param executionContext	  current execution context
   	* @param obj the XObject to output
   	*/
   	virtual void
  -	outputToResultTree(const XObject&	xobj) = 0;
  +	outputToResultTree(
  +			StylesheetExecutionContext&		executionContext,
  +			const XObject&					xobj) = 0;
   
   	/**
   	 * Reset the state of execution to node 'xmlNode' in source tree