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/09/19 17:14:32 UTC

cvs commit: xml-xalan/c/src/XSLT XalanNumberingResourceBundle.cpp XalanNumberingResourceBundle.hpp AVT.hpp ElemApplyTemplates.cpp ElemCopyOf.cpp ElemForEach.cpp ElemLiteralResult.hpp ElemNumber.cpp ElemNumber.hpp ElemValueOf.cpp ElemValueOf.hpp ExtensionFunctionHandler.hpp FunctionDocument.cpp FunctionElementAvailable.cpp FunctionFormatNumber.cpp FunctionFunctionAvailable.cpp FunctionKey.cpp FunctionSystemProperty.cpp FunctionUnparsedEntityURI.cpp KeyTable.cpp KeyTable.hpp NodeSorter.cpp Stylesheet.cpp Stylesheet.hpp StylesheetConstructionContextDefault.hpp StylesheetExecutionContext.hpp StylesheetExecutionContextDefault.cpp StylesheetExecutionContextDefault.hpp StylesheetHandler.cpp StylesheetRoot.cpp StylesheetRoot.hpp VariablesStack.cpp VariablesStack.hpp XSLTEngineImpl.cpp XSLTProcessorEnvSupportDefault.hpp

dbertoni    00/09/19 08:14:28

  Modified:    c/src/XSLT AVT.hpp ElemApplyTemplates.cpp ElemCopyOf.cpp
                        ElemForEach.cpp ElemLiteralResult.hpp
                        ElemNumber.cpp ElemNumber.hpp ElemValueOf.cpp
                        ElemValueOf.hpp ExtensionFunctionHandler.hpp
                        FunctionDocument.cpp FunctionElementAvailable.cpp
                        FunctionFormatNumber.cpp
                        FunctionFunctionAvailable.cpp FunctionKey.cpp
                        FunctionSystemProperty.cpp
                        FunctionUnparsedEntityURI.cpp KeyTable.cpp
                        KeyTable.hpp NodeSorter.cpp Stylesheet.cpp
                        Stylesheet.hpp
                        StylesheetConstructionContextDefault.hpp
                        StylesheetExecutionContext.hpp
                        StylesheetExecutionContextDefault.cpp
                        StylesheetExecutionContextDefault.hpp
                        StylesheetHandler.cpp StylesheetRoot.cpp
                        StylesheetRoot.hpp VariablesStack.cpp
                        VariablesStack.hpp XSLTEngineImpl.cpp
                        XSLTProcessorEnvSupportDefault.hpp
  Added:       c/src/XSLT XalanNumberingResourceBundle.cpp
                        XalanNumberingResourceBundle.hpp
  Log:
  Changes for AIX port and for output transcoding.
  
  Revision  Changes    Path
  1.7       +7 -7      xml-xalan/c/src/XSLT/AVT.hpp
  
  Index: AVT.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/AVT.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AVT.hpp	2000/06/23 14:30:14	1.6
  +++ AVT.hpp	2000/09/19 15:11:36	1.7
  @@ -58,7 +58,7 @@
   #define XALAN_AVT_HEADER_GUARD 
   
   /**
  - * $Id: AVT.hpp,v 1.6 2000/06/23 14:30:14 dbertoni Exp $
  + * $Id: AVT.hpp,v 1.7 2000/09/19 15:11:36 dbertoni Exp $
    * 
    * $State: Exp $
    * 
  @@ -145,17 +145,17 @@
   			const PrefixResolver&	prefixResolver,
   			XPathExecutionContext&	executionContext) const;
   
  -private:
  -
  -	// not implemented
  -	AVT(const AVT &);
  -	AVT& operator=(const AVT &);
  -
   #if defined(XALAN_NO_NAMESPACES)
   	typedef vector<const AVTPart*>		AVTPartPtrVectorType;
   #else
   	typedef std::vector<const AVTPart*>	AVTPartPtrVectorType;
   #endif
  +
  +private:
  +
  +	// not implemented
  +	AVT(const AVT &);
  +	AVT& operator=(const AVT &);
   
   	XalanDOMString			m_simpleString;
   
  
  
  
  1.8       +2 -6      xml-xalan/c/src/XSLT/ElemApplyTemplates.cpp
  
  Index: ElemApplyTemplates.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemApplyTemplates.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ElemApplyTemplates.cpp	2000/05/24 19:38:47	1.7
  +++ ElemApplyTemplates.cpp	2000/09/19 15:11:38	1.8
  @@ -118,13 +118,9 @@
   
   	if(0 == m_pSelectPattern)
   	{
  -		if(0 == stylesheetTree.getDefaultATXpath())
  -		{
  -			stylesheetTree.setDefaultATXpath(
  -				constructionContext.createXPath(XALAN_STATIC_UCODE_STRING("node()"), *this));
  -		}
  +		m_pSelectPattern = constructionContext.createXPath(XALAN_STATIC_UCODE_STRING("node()"), *this);
   
  -		m_pSelectPattern = stylesheetTree.getDefaultATXpath();
  +		assert(m_pSelectPattern != 0);
   	}
   }
   
  
  
  
  1.8       +14 -10    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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ElemCopyOf.cpp	2000/08/10 18:43:04	1.7
  +++ ElemCopyOf.cpp	2000/09/19 15:11:40	1.8
  @@ -137,19 +137,22 @@
   
   	const XObject::eObjectType	type = value->getType();
   
  -	XalanDOMString s;
  -
   	switch(type)
   	{
   	case XObject::eTypeBoolean:
   	case XObject::eTypeNumber:
   	case XObject::eTypeString:
  -		s = value->str();
  -		executionContext.characters(toCharArray(s), 0, length(s));
  -			break;
  +		{
  +			const XalanDOMString&	s = value->str();
  +
  +			executionContext.characters(toCharArray(s), 0, length(s));
  +		}
  +		break;
   
   	case XObject::eTypeNodeSet:
   	{
  +		XalanDOMString			s;
  +
   		const NodeRefListBase&	nl = value->nodeset();
   
   		unsigned int			nChildren = nl.getLength();
  @@ -215,13 +218,14 @@
   		break;
   
   	default:
  -		s = value->str();
  -
  -		if (!isEmpty(s))
   		{
  -			executionContext.characters(toCharArray(s), 0, s.length());
  -		}
  +			const XalanDOMString&	s = value->str();
   
  +			if (!isEmpty(s))
  +			{
  +				executionContext.characters(toCharArray(s), 0, s.length());
  +			}
  +		}
   		break;
   	}
   }
  
  
  
  1.6       +1 -1      xml-xalan/c/src/XSLT/ElemForEach.cpp
  
  Index: ElemForEach.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemForEach.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ElemForEach.cpp	2000/05/29 22:49:00	1.5
  +++ ElemForEach.cpp	2000/09/19 15:11:42	1.6
  @@ -129,7 +129,7 @@
   
   	for_each(m_sortElems.begin(),
   			 m_sortElems.end(),
  -			 DeleteFunctor<ElemTemplateElement>());
  +			 DeleteFunctor<ElemSort>());
   }
   
   
  
  
  
  1.12      +6 -6      xml-xalan/c/src/XSLT/ElemLiteralResult.hpp
  
  Index: ElemLiteralResult.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemLiteralResult.hpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ElemLiteralResult.hpp	2000/08/28 01:19:40	1.11
  +++ ElemLiteralResult.hpp	2000/09/19 15:11:43	1.12
  @@ -132,6 +132,12 @@
   			XalanNode*						sourceNode,
   			const QName&					mode) const;
   
  +#if defined(XALAN_NO_NAMESPACES)
  +	typedef vector<const AVT*>				AVTVectorType;
  +#else
  +	typedef std::vector<const AVT*>			AVTVectorType;
  +#endif
  +
   private:
   
   	// not implemented
  @@ -167,12 +173,6 @@
   	shouldExcludeResultNamespaceNode(
   			const XalanDOMString&	thePrefix,
   			const XalanDOMString&	theURI) const;
  -
  -#if defined(XALAN_NO_NAMESPACES)
  -	typedef vector<const AVT*>				AVTVectorType;
  -#else
  -	typedef std::vector<const AVT*>			AVTVectorType;
  -#endif
   
   	/**
   	 * A vector to keep track of the attribute elements.
  
  
  
  1.24      +287 -15   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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ElemNumber.cpp	2000/09/05 02:24:52	1.23
  +++ ElemNumber.cpp	2000/09/19 15:11:45	1.24
  @@ -730,7 +730,281 @@
   
   
   
  +bool
  +ElemNumber::evaluateLetterValueAVT(
  +			StylesheetExecutionContext&		executionContext,
  +			XalanNode* 						contextNode,
  +			const XalanDOMString&			compareValue) const
  +{
  +	if (m_lettervalue_avt == 0)
  +	{
  +		return false;
  +	}
  +	else
  +	{
  +		XalanDOMString letterVal;
  +
  +		m_lettervalue_avt->evaluate(
  +				letterVal,
  +				contextNode,
  +				*this,
  +				executionContext);
  +
  +		return equals(compareValue, letterVal);
  +	}
  +}
  +
  +
  +
   XalanDOMString
  +ElemNumber::traditionalAlphaCount(
  +			int										theValue,
  +			const XalanNumberingResourceBundle&		theResourceBundle) const
  +{
  +	typedef XalanNumberingResourceBundle::IntVectorType			IntVectorType;
  +	typedef XalanNumberingResourceBundle::DigitsTableVectorType	DigitsTableVectorType;
  +	typedef XalanNumberingResourceBundle::eNumberingMethod		eNumberingMethod;
  +	typedef XalanNumberingResourceBundle::eMultiplierOrder		eMultiplierOrder;
  +
  +	// if this number is larger than the largest number we can represent, error!
  +	//if (val > theResourceBundle.getMaxNumericalValue())
  +	//return XSLTErrorResources.ERROR_STRING;
  +	XalanDOMCharVectorType	table;
  +
  +	// index in table of the last character that we stored
  +	IntVectorType::size_type	lookupIndex = 1;  // start off with anything other than zero to make correction work
  +
  +	// Create a buffer to hold the result
  +	// TODO:  size of the table can be detereined by computing
  +	// logs of the radix.  For now, we fake it.
  +	XalanDOMChar	buf[100];
  +
  +	//some languages go left to right(ie. english), right to left (ie. Hebrew),
  +	//top to bottom (ie.Japanese), etc... Handle them differently
  +	//String orientation = thisBundle.getString(Constants.LANG_ORIENTATION);
  +
  +	// next character to set in the buffer
  +	int charPos = 0;
  +
  +	// array of number groups: ie.1000, 100, 10, 1
  +	const IntVectorType&	groups = theResourceBundle.getNumberGroups();
  +
  +	const IntVectorType::size_type	groupsSize = groups.size();
  +
  +	// array of tables of hundreds, tens, digits. Indexes into the vector
  +	// returned by 
  +	const IntVectorType&	tables = theResourceBundle.getDigitsTableTable();
  +
  +	const DigitsTableVectorType&	digitsTable = theResourceBundle.getDigitsTable();
  +
  +	// some languages have additive alphabetical notation,
  +	// some multiplicative-additive, etc... Handle them differently.
  +	const eNumberingMethod	numbering = theResourceBundle.getNumberingMethod();
  +
  +	// do multiplicative part first
  +	if (numbering == XalanNumberingResourceBundle::eMultiplicativeAdditive)
  +	{
  +		const eMultiplierOrder	mult_order = theResourceBundle.getMultiplierOrder();
  +
  +		const IntVectorType&	multiplier = theResourceBundle.getMultipliers();
  +
  +		const IntVectorType::size_type	multiplierSize = multiplier.size();
  +
  +		const XalanDOMCharVectorType&	zeroChar = theResourceBundle.getZeroChar();
  +
  +		const XalanDOMCharVectorType::size_type		zeroCharSize = zeroChar.size();
  +
  +		const XalanDOMCharVectorType&	multiplierChars = theResourceBundle.getMultiplierChars();
  +
  +		IntVectorType::size_type	i = 0;
  +
  +		// skip to correct multiplier
  +		while (i < multiplierSize && theValue < multiplier[i])
  +		{
  +			i++;
  +		}
  +
  +		do
  +		{
  +			if (i >= multiplierSize)
  +				break;			  //number is smaller than multipliers
  +
  +			// some languages (ie chinese) put a zero character (and only one) when
  +			// the multiplier is multiplied by zero. (ie, 1001 is 1X1000 + 0X100 + 0X10 + 1)
  +			// 0X100 is replaced by the zero character, we don't need one for 0X10
  +			if (theValue < multiplier[i])
  +			{
  +				if (zeroCharSize == 0)
  +				{
  +					i++;
  +				} 
  +				else
  +				{
  +					if (buf[charPos - 1] != zeroChar[0])
  +					{
  +						buf[charPos++] = zeroChar[0];
  +					}
  +
  +					i++;
  +				}
  +			}
  +			else if (theValue >= multiplier[i])
  +			{
  +
  +				int mult = theValue / multiplier[i];
  +
  +				theValue = theValue % multiplier[i];		 // save this.
  +
  +				IntVectorType::size_type	k = 0;
  +
  +				while (k < groupsSize)
  +				{
  +					lookupIndex = 1;				 // initialize for each table
  +			
  +					if (mult / groups[k] <= 0) 		 // look for right table
  +					{
  +						k++;
  +					}
  +					else
  +					{
  +						assert(digitsTable.size() > tables[k]);
  +
  +						// get the table
  +						const XalanDOMCharVectorType&	THEletters =
  +								digitsTable[tables[k]];
  +
  +						const XalanDOMCharVectorType::size_type		THElettersSize =
  +							THEletters.size();
  +
  +						table.resize(THElettersSize + 1);					
  +
  +						const IntVectorType::size_type	tableSize = table.size();
  +
  +						XalanDOMCharVectorType::size_type	j = 0;
  +
  +						for (; j < THElettersSize; j++)
  +						{
  +							table[j + 1] = THEletters[j];
  +						}
  +
  +						table[0] = THEletters[j - 1];	 // don't need this
  +
  +						// index in "table" of the next char to emit
  +						lookupIndex  = mult / groups[k];
  +
  +						//this should not happen
  +						if (lookupIndex == 0 && mult == 0)
  +						{
  +							break;
  +						}
  +
  +						assert(i < multiplierChars.size());
  +
  +						const XalanDOMChar	multiplierChar = multiplierChars[i];
  +
  +						// put out the next character of output	
  +						if (lookupIndex < tableSize)
  +						{
  +							if(mult_order == XalanNumberingResourceBundle::ePrecedes)
  +							{
  +								buf[charPos++] = multiplierChar;
  +								buf[charPos++] = table[lookupIndex];
  +							}
  +							else
  +							{
  +								// don't put out 1 (ie 1X10 is just 10)
  +								if (lookupIndex == 1 && i == multiplierSize - 1)
  +								{
  +								}
  +								else
  +								{
  +									buf[charPos++] =  table[lookupIndex];
  +								}
  +
  +								buf[charPos++] =	multiplierChar ;
  +							}
  +
  +							break;		 // all done!
  +						}
  +						else
  +						{
  +							return XALAN_STATIC_UCODE_STRING("#error");
  +						}
  +					} //end else
  +				} // end while	
  +
  +				i++;
  +
  +			} // end else if
  +		} // end do while
  +		while ( i < multiplierSize);		
  +	}
  +
  +	// Now do additive part...
  +
  +	IntVectorType::size_type	count = 0;
  +
  +	// do this for each table of hundreds, tens, digits...
  +	while (count < groupsSize)
  +	{
  +		if (theValue / groups[count] <= 0)
  +		{
  +			// look for correct table
  +			count++;
  +		}
  +		else
  +		{
  +			const XalanDOMCharVectorType&	theletters =
  +								digitsTable[tables[count]];
  +
  +			const XalanDOMCharVectorType::size_type		thelettersSize =
  +							theletters.size();
  +
  +			table.resize(thelettersSize + 1);
  +		
  +			const IntVectorType::size_type	tableSize = table.size();
  +
  +			XalanDOMCharVectorType::size_type	j = 0;
  +
  +			// need to start filling the table up at index 1
  +			for (0; j < thelettersSize; j++)
  +			{
  +				table[j + 1] = theletters[j];
  +			}
  +
  +			table[0] = theletters[j - 1];  // don't need this
  +
  +			// index in "table" of the next char to emit
  +			lookupIndex  = theValue / groups[count];
  +
  +			// shift input by one "column"
  +			theValue = theValue % groups[count];
  +
  +			// this should not happen
  +			if (lookupIndex == 0 && theValue == 0)
  +				break;					
  +
  +			if (lookupIndex < tableSize)
  +			{
  +				// put out the next character of output	
  +				buf[charPos++] = table[lookupIndex];	// left to right or top to bottom					
  +			}
  +			else
  +			{
  +				return XALAN_STATIC_UCODE_STRING("#error");
  +			}
  +
  +			count++;
  +		}
  +	} // end while
  +
  +	// String s = new String(buf, 0, charPos);
  +	return XalanDOMString(buf, charPos);
  +}
  +
  +
  +
  +XalanDOMString
   ElemNumber::getFormattedNumber(
   			StylesheetExecutionContext&		executionContext,
   			XalanNode*						contextNode,
  @@ -738,16 +1012,6 @@
   			int								numberWidth,
   			int								listElement) const
   {
  -
  -	StylesheetExecutionContext::XalanNumberFormatAutoPtr	formatter(
  -			getNumberFormatter(executionContext, contextNode));
  -
  -	XalanDOMString	padString = formatter->format(0);
  -	XalanDOMString letterVal;
  -	if (m_lettervalue_avt != 0)
  -		m_lettervalue_avt->evaluate(letterVal, contextNode, *this,
  -				executionContext);
  -
   	XalanDOMString	formattedNumber;
   
   	switch(numberType)
  @@ -788,6 +1052,11 @@
   
   		default: // "1"
   			{
  +				StylesheetExecutionContext::XalanNumberFormatAutoPtr	formatter(
  +						getNumberFormatter(executionContext, contextNode));
  +
  +				XalanDOMString	padString = formatter->format(0);
  +
   				const XalanDOMString		numString =
   					formatter->format(listElement);
   
  @@ -1255,22 +1524,23 @@
   
   
   
  -static XalanDOMString							s_elalphaCountTable;
  +static XalanDOMString								s_elalphaCountTable;
   
  -static XalanDOMString							s_alphaCountTable;
  +static XalanDOMString								s_alphaCountTable;
   
  -static ElemNumber::DecimalToRomanVectorType		s_romanConvertTable;
  +static ElemNumber::DecimalToRomanVectorType			s_romanConvertTable;
   
  +static ElemNumber::NumberingResourceBundleMapType	s_resourceBundles;
   
  -
   const XalanDOMString&	ElemNumber::s_elalphaCountTable = ::s_elalphaCountTable;
   
   const XalanDOMString&	ElemNumber::s_alphaCountTable = ::s_alphaCountTable;
   
   const ElemNumber::DecimalToRomanVectorType&		ElemNumber::s_romanConvertTable =
   				::s_romanConvertTable;
  -
   
  +const ElemNumber::NumberingResourceBundleMapType&	ElemNumber::s_resourceBundles =
  +				::s_resourceBundles;
   
   void
   ElemNumber::initialize()
  @@ -1299,4 +1569,6 @@
   	clear(::s_elalphaCountTable);;
   
   	DecimalToRomanVectorType().swap(::s_romanConvertTable);
  +
  +	NumberingResourceBundleMapType().swap(::s_resourceBundles);
   }
  
  
  
  1.18      +33 -15    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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ElemNumber.hpp	2000/08/31 19:43:09	1.17
  +++ ElemNumber.hpp	2000/09/19 15:11:47	1.18
  @@ -58,7 +58,7 @@
   #define XALAN_ELEMNUMBER_HEADER_GUARD 
   
   /**
  - * $Id: ElemNumber.hpp,v 1.17 2000/08/31 19:43:09 dbertoni Exp $
  + * $Id: ElemNumber.hpp,v 1.18 2000/09/19 15:11:47 dbertoni Exp $
    * 
    * $State: Exp $
    * 
  @@ -66,12 +66,12 @@
    */
   
   // Base include file.  Must be first.
  -#include "XSLTDefinitions.hpp"
  +#include <XSLT/XSLTDefinitions.hpp>
   
   
   
   // Base class header file.
  -#include "ElemTemplateElement.hpp"
  +#include <XSLT/ElemTemplateElement.hpp>
   
   
   
  @@ -79,7 +79,8 @@
   
   
   
  -#include "DecimalToRoman.hpp"
  +#include <XSLT/DecimalToRoman.hpp>
  +#include <XSLT/XalanNumberingResourceBundle.hpp>
   
   
   
  @@ -100,18 +101,23 @@
   public:
   
   #if defined(XALAN_NO_NAMESPACES)
  -	typedef vector<DecimalToRoman>			DecimalToRomanVectorType;
  -	typedef vector<int>						IntArrayType;
  -	typedef vector<Counter>					CounterVectorType;
  +	typedef vector<DecimalToRoman>					DecimalToRomanVectorType;
  +	typedef vector<int>								IntArrayType;
  +	typedef vector<Counter>							CounterVectorType;
   	typedef map<const ElemNumber*,
   				CounterVectorType,
  -				less<const ElemNumber*> >	ElemToCounterVectorMapType;
  +				less<const ElemNumber*> >			ElemToCounterVectorMapType;
  +	typedef map<XalanDOMChar,
  +				XalanNumberingResourceBundle,
  +				less<XalanDOMChar>					NumberingResourceBundleMapType;
   #else
  -	typedef std::vector<DecimalToRoman>		DecimalToRomanVectorType;
  -	typedef std::vector<int>				IntArrayType;
  -	typedef std::vector<Counter>			CounterVectorType;
  +	typedef std::vector<DecimalToRoman>				DecimalToRomanVectorType;
  +	typedef std::vector<int>						IntArrayType;
  +	typedef std::vector<Counter>					CounterVectorType;
   	typedef std::map<const ElemNumber*,
  -					 CounterVectorType>		ElemToCounterVectorMapType;
  +					 CounterVectorType>				ElemToCounterVectorMapType;
  +	typedef std::map<XalanDOMChar,
  +					 XalanNumberingResourceBundle>	NumberingResourceBundleMapType;
   #endif
   
   	/**
  @@ -325,6 +331,17 @@
   
   private:
   
  +	bool
  +	evaluateLetterValueAVT(
  +			StylesheetExecutionContext&		executionContext,
  +			XalanNode* 						contextNode,
  +			const XalanDOMString&			compareValue) const;
  +
  +	XalanDOMString
  +	traditionalAlphaCount(
  +			int										theValue,
  +			const XalanNumberingResourceBundle&		theResourceBundle) const;
  +
   	/*
   	 * Get Formatted number
   	 */
  @@ -363,9 +380,10 @@
   	 */
   	static const DecimalToRomanVectorType&	s_romanConvertTable;
   
  -
  -
  -// Inner classes
  +	/**
  +	 * A map of supported numbering resource bundles.
  +	 */
  +	static const NumberingResourceBundleMapType&	s_resourceBundles;
   
   
   	/**
  
  
  
  1.12      +13 -3     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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ElemValueOf.cpp	2000/09/05 02:24:53	1.11
  +++ ElemValueOf.cpp	2000/09/19 15:11:49	1.12
  @@ -163,10 +163,10 @@
   {
   	ElemTemplateElement::execute(executionContext, sourceTree, sourceNode, mode);
   
  -	XalanDOMString	theValue;
  -
   	if (m_isDot == true)
   	{
  +		XalanDOMString	theValue;
  +
   		const XalanNode::NodeType	type = sourceNode->getNodeType();
   
   		if(type == XalanNode::COMMENT_NODE ||
  @@ -189,6 +189,8 @@
   							   *m_selectPattern,
   							   executionContext.getXObjectFactory().createString(theValue)));       
   		}
  +
  +		outputValue(executionContext, theValue);
   	}
   	else
   	{
  @@ -213,11 +215,19 @@
   
   			if (XObject::eTypeNull != type)
   			{
  -				theValue = value->str();
  +				outputValue(executionContext, value->str());
   			}
   		}
   	}
  +}
  +
  +
   
  +void
  +ElemValueOf::outputValue(
  +			StylesheetExecutionContext&		executionContext,
  +			const XalanDOMString&			theValue) const
  +{
   	const unsigned int	len = length(theValue);
   
   	if(len > 0)
  
  
  
  1.6       +11 -0     xml-xalan/c/src/XSLT/ElemValueOf.hpp
  
  Index: ElemValueOf.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemValueOf.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ElemValueOf.hpp	2000/05/15 15:56:38	1.5
  +++ ElemValueOf.hpp	2000/09/19 15:11:50	1.6
  @@ -110,6 +110,17 @@
   private:
   
   	/**
  +	 * Construct an object corresponding to an "xsl:value-of" element
  +	 * 
  +	 * @param executionContext The current execution context
  +	 * @param theValue The value to output
  +	 */
  +	void
  +	outputValue(
  +			StylesheetExecutionContext&		executionContext,
  +			const XalanDOMString&			theValue) const;
  +
  +	/**
   	 * The select pattern used to locate the value.
   	 */
   	const XPath*	m_selectPattern;
  
  
  
  1.7       +4 -8      xml-xalan/c/src/XSLT/ExtensionFunctionHandler.hpp
  
  Index: ExtensionFunctionHandler.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ExtensionFunctionHandler.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExtensionFunctionHandler.hpp	2000/08/22 20:21:21	1.6
  +++ ExtensionFunctionHandler.hpp	2000/09/19 15:11:51	1.7
  @@ -162,9 +162,11 @@
   
   	/// Vector of pointers to function arguments
   #if defined(XALAN_NO_NAMESPACES)
  -	typedef vector<void*>		ArgVectorType;
  +	typedef vector<void*>								ArgVectorType;
  +	typedef set<XalanDOMString, less<XalanDOMString> >	StringSetType;
   #else
  -	typedef std::vector<void*>	ArgVectorType;
  +	typedef std::vector<void*>			ArgVectorType;
  +	typedef std::set<XalanDOMString>	StringSetType;
   #endif
   
   	/**
  @@ -196,12 +198,6 @@
   	XalanDOMString	m_scriptSrcURL;  // URL of source of script (if any)
   
   	void* m_javaObject;		    // object for javaclass engine
  -
  -#if defined(XALAN_NO_NAMESPACES)
  -	typedef set<XalanDOMString, less<XalanDOMString> > StringSetType;
  -#else
  -	typedef std::set<XalanDOMString> StringSetType;
  -#endif
   
   	StringSetType	m_functions; // functions of namespace
   
  
  
  
  1.15      +6 -4      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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FunctionDocument.cpp	2000/09/05 02:24:53	1.14
  +++ FunctionDocument.cpp	2000/09/19 15:11:52	1.15
  @@ -168,9 +168,11 @@
   #endif
   											context->getOwnerDocument();
   
  -		const XObject* const	arg = args[0];
  +		const XObject* const		arg = args[0];
   		assert(arg != 0);
   
  +		const XObject::eObjectType	theType = arg->getType();
  +
   		XalanDOMString				base;
   
   		if(args.size() == 1)
  @@ -225,16 +227,16 @@
   		// This list will hold the nodes...
   		BorrowReturnMutableNodeRefList	mnl(executionContext);
   
  -		const unsigned int		nRefs = XObject::eTypeNodeSet == arg->getType() ?
  +		const unsigned int		nRefs = XObject::eTypeNodeSet == theType ?
   													arg->nodeset().getLength()
   													: 1;
   
   		for(unsigned int i = 0; i < nRefs; i++)
   		{
  -			assert(XObject::eTypeNodeSet != arg->getType() ||
  +			assert(XObject::eTypeNodeSet != theType ||
   								arg->nodeset().item(i) != 0);
   
  -			XalanDOMString	ref = XObject::eTypeNodeSet == arg->getType() ?
  +			XalanDOMString	ref = XObject::eTypeNodeSet == theType ?
   													arg->nodeset().item(i)->getXSLTData() :
   													arg->str();
   
  
  
  
  1.5       +1 -1      xml-xalan/c/src/XSLT/FunctionElementAvailable.cpp
  
  Index: FunctionElementAvailable.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionElementAvailable.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FunctionElementAvailable.cpp	2000/09/05 02:24:53	1.4
  +++ FunctionElementAvailable.cpp	2000/09/19 15:11:53	1.5
  @@ -96,7 +96,7 @@
   		return 0;
   	}
   
  -	const XalanDOMString	fullName = args[0]->str();
  +	const XalanDOMString&	fullName = args[0]->str();
   
   	const unsigned int		nameLength = length(fullName);
   	const unsigned int		indexOfNSSep = indexOf(fullName, XalanUnicode::charColon);
  
  
  
  1.4       +19 -9     xml-xalan/c/src/XSLT/FunctionFormatNumber.cpp
  
  Index: FunctionFormatNumber.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionFormatNumber.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FunctionFormatNumber.cpp	2000/05/08 17:29:35	1.3
  +++ FunctionFormatNumber.cpp	2000/09/19 15:11:55	1.4
  @@ -58,9 +58,10 @@
   
   
   
  +#include <PlatformSupport/DoubleSupport.hpp>
  +#include <PlatformSupport/DOMStringHelper.hpp>
   #include <PlatformSupport/XalanDecimalFormat.hpp>
   #include <PlatformSupport/XalanDecimalFormatSymbols.hpp>
  -#include <PlatformSupport/DOMStringHelper.hpp>
   
   
   
  @@ -110,13 +111,13 @@
   		assert(theSize == 2 || args[2] != 0);
   
   		const double						theNumber = args[0]->num();
  -		const XalanDOMString				thePattern = args[1]->str();
  +		const XalanDOMString&				thePattern = args[1]->str();
   
   		const XalanDecimalFormatSymbols*	theDFS = 0;
   
   		if (theSize == 3)
   		{
  -			const XalanDOMString				theDecimalFormatName = args[2]->str();
  +			const XalanDOMString&				theDecimalFormatName = args[2]->str();
   			assert(length(theDecimalFormatName) != 0);
   
   			theDFS = executionContext.getDecimalFormatSymbols(theDecimalFormatName);
  @@ -166,14 +167,23 @@
   			const XalanDOMString&				thePattern,
   			const XalanDecimalFormatSymbols*	theDFS)
   {
  -	executionContext.warn(XALAN_STATIC_UCODE_STRING("format-number() is not fully implemented!"),
  -						  context);
  +	if (DoubleSupport::isNaN(theNumber) == true ||
  +		DoubleSupport::isNegativeInfinity(theNumber) == true ||
  +		DoubleSupport::isPositiveInfinity(theNumber) == true )
  +	{
  +		return DoubleToDOMString(theNumber);
  +	}
  +	else
  +	{
  +		executionContext.warn(XALAN_STATIC_UCODE_STRING("format-number() is not fully implemented!"),
  +							  context);
   
  -	XalanDecimalFormat	theFormatter;
  +		XalanDecimalFormat	theFormatter;
   
  -	theFormatter.setDecimalFormatSymbols(theDFS != 0 ? *theDFS : XalanDecimalFormatSymbols());
  +		theFormatter.setDecimalFormatSymbols(theDFS != 0 ? *theDFS : XalanDecimalFormatSymbols());
   
  -	theFormatter.applyLocalizedPattern(thePattern);
  +		theFormatter.applyLocalizedPattern(thePattern);
   
  -	return theFormatter.format(theNumber);
  +		return theFormatter.format(theNumber);
  +	}
   }
  
  
  
  1.5       +1 -1      xml-xalan/c/src/XSLT/FunctionFunctionAvailable.cpp
  
  Index: FunctionFunctionAvailable.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionFunctionAvailable.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FunctionFunctionAvailable.cpp	2000/09/05 02:24:53	1.4
  +++ FunctionFunctionAvailable.cpp	2000/09/19 15:11:56	1.5
  @@ -94,7 +94,7 @@
   							   context);
   	}
   
  -	const XalanDOMString	fullName = args[0]->str();
  +	const XalanDOMString&	fullName = args[0]->str();
   
   	const unsigned int		nameLength = length(fullName);
   	const unsigned int		indexOfNSSep = indexOf(fullName, XalanUnicode::charColon);
  
  
  
  1.12      +6 -13     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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FunctionKey.cpp	2000/08/22 20:21:23	1.11
  +++ FunctionKey.cpp	2000/09/19 15:11:57	1.12
  @@ -180,14 +180,12 @@
   						{
   							usedrefs.insert(ref);
   
  -							const NodeRefListBase* const		nl =
  -									executionContext.getNodeSetByKey(docContext, 
  +							executionContext.getNodeSetByKey(
  +											docContext, 
   											keyname,
   											ref,
  -											*executionContext.getPrefixResolver());
  -							assert(nl != 0);
  -
  -							theNodeRefList->addNodesInDocOrder(*nl, executionContext);
  +											*executionContext.getPrefixResolver(),
  +											*theNodeRefList.get());
   						}
   					}
   				}
  @@ -197,16 +195,11 @@
   		{
   			const XalanDOMString			ref = arg->str();
   
  -			const NodeRefListBase* const	nl =
   					executionContext.getNodeSetByKey(docContext,
   											keyname,
   											ref,
  -											*executionContext.getPrefixResolver());
  -
  -			if (nl != 0)
  -			{
  -				theNodeRefList->addNodesInDocOrder(*nl, executionContext);
  -			}
  +											*executionContext.getPrefixResolver(),
  +											*theNodeRefList.get());
   		}
   
   		return executionContext.getXObjectFactory().createNodeSet(theNodeRefList);
  
  
  
  1.8       +7 -3      xml-xalan/c/src/XSLT/FunctionSystemProperty.cpp
  
  Index: FunctionSystemProperty.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionSystemProperty.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FunctionSystemProperty.cpp	2000/09/05 02:24:53	1.7
  +++ FunctionSystemProperty.cpp	2000/09/19 15:11:58	1.8
  @@ -95,6 +95,10 @@
   			int								/* opPos */,
   			const XObjectArgVectorType&		args)
   {
  +#if !defined(XALAN_NO_NAMESPACES)
  +	using std::string;
  +#endif
  +
   	if (args.size() != 1)
   	{
   		executionContext.error("The system-property() function takes a single argument!", context);
  @@ -102,7 +106,7 @@
   		return 0;
   	}
   
  -	const XalanDOMString	fullName = args[0]->str();
  +	const XalanDOMString&	fullName = args[0]->str();
   	const unsigned int		fullNameLength = length(fullName);
   	const unsigned int		indexOfNSSep = indexOf(fullName, XalanUnicode::charColon);
   
  @@ -145,12 +149,12 @@
   		{
   			executionContext.warn("Don't currently do anything with namespace " + nspace + " in property: " + fullName);
   
  -			result = ::getenv(DOMStringToStdString(propName).c_str());
  +			result = ::getenv(c_str(TranscodeToLocalCodePage(propName)));
   		}
   	}
   	else
   	{
  -		result = ::getenv(DOMStringToStdString(fullName).c_str());
  +		result = ::getenv(c_str(TranscodeToLocalCodePage(fullName)));
   	}
   
   	if (fNumberResult == true)
  
  
  
  1.6       +1 -1      xml-xalan/c/src/XSLT/FunctionUnparsedEntityURI.cpp
  
  Index: FunctionUnparsedEntityURI.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionUnparsedEntityURI.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FunctionUnparsedEntityURI.cpp	2000/08/22 20:21:23	1.5
  +++ FunctionUnparsedEntityURI.cpp	2000/09/19 15:11:58	1.6
  @@ -110,7 +110,7 @@
   		return 0;
   	}
   
  -	const XalanDOMString	name = (args[0])->str();
  +	const XalanDOMString&	name = (args[0])->str();
   
   	XalanDocument* const	doc =
   			XalanNode::DOCUMENT_NODE == context->getNodeType() ?
  
  
  
  1.11      +38 -48    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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- KeyTable.cpp	2000/08/22 20:21:24	1.10
  +++ KeyTable.cpp	2000/09/19 15:12:00	1.11
  @@ -76,8 +76,10 @@
   
   #include "KeyDeclaration.hpp"
   #include "StylesheetExecutionContext.hpp"
  +#include "XSLTProcessorException.hpp"
   
   
  +
   const MutableNodeRefList	KeyTable::s_dummyList;
   
   
  @@ -86,7 +88,6 @@
   			XalanNode*							doc,
   			XalanNode*							startNode,
   			const PrefixResolver&				resolver,
  -			const XalanDOMString&				name,
   			const KeyDeclarationVectorType&		keyDeclarations,
   			StylesheetExecutionContext&			executionContext) :
   	m_docKey(doc),
  @@ -94,13 +95,11 @@
   {
       XalanNode*	pos = startNode;
   
  -	bool		fDone = false;
  -
   	const KeyDeclarationVectorType::size_type	nDeclarations =
   			keyDeclarations.size();
   
       // Do a non-recursive pre-walk over the tree.
  -    while(0 != pos && fDone == false)
  +    while(0 != pos)
       {
   		// We're going to have to walk the attribute list 
   		// if it's an element, so get the attributes.
  @@ -128,18 +127,20 @@
   		// execute once, then execute for each of the attributes.
   		XalanNode*	testNode = pos;
   
  -		for(int nodeIndex = -1; nodeIndex < nNodes && fDone == false;)
  +		for(int nodeIndex = -1; nodeIndex < nNodes;)
   		{
   			// Walk through each of the declarations made with xsl:key
  -			for(unsigned int i = 0; i < nDeclarations && fDone == false; i++)
  +			for(unsigned int i = 0; i < nDeclarations; ++i)
   			{
   				const KeyDeclaration&	kd = keyDeclarations[i];
   
  -				if (equals(kd.getName(), name))
  +//				if (equals(kd.getName(), name))
   				{
   					if (executionContext.getInConstruction(kd) == true)			
   					{
  -						fDone = true;
  +						throw XSLTProcessorException(
  +							"The use of the key() function in the \"match\" or \"use\" attribute of xsl:key is illegal!",
  +							"XSLTKeyIllegalKeyFunctionException");
   					}
   					else
   					{
  @@ -186,7 +187,6 @@
   							// able to use to look up the given node.
   							for(unsigned int k = 0; k < nUseValues; k++)
   							{
  -
   								// Use getExpr to get the string value of the given node. I hope 
   								// the string assumption is the right thing... I can't see how 
   								// it could work any other way.
  @@ -229,49 +229,42 @@
   				} // if (equals(kd.getName(), name)
   			} // end for(int i = 0; i < nDeclarations; i++)
   
  -			if (fDone == false)
  -			{
  -				nodeIndex++;
  +			nodeIndex++;
   
  -				if(0 != attrs)
  -				{
  -					testNode = attrs->item(nodeIndex);
  -				}
  +			if(0 != attrs)
  +			{
  +				testNode = attrs->item(nodeIndex);
   			}
   		} // for(int nodeIndex = -1; nodeIndex < nNodes;)
   
  -		if (fDone == false)
  -		{
  -			// The rest of this is getting the next prewalk position in 
  -			// the tree.
  -
  -			XalanNode*	nextNode = pos->getFirstChild();
  +		// The rest of this is getting the next prewalk position in 
  +		// the tree.
  +		XalanNode*	nextNode = pos->getFirstChild();
   
  -			while(0 == nextNode)
  +		while(0 == nextNode)
  +		{
  +			if(startNode == pos)
   			{
  -				if(startNode == pos)
  -				{
  -					break;
  -				}
  -				else
  +				break;
  +			}
  +			else
  +			{
  +				nextNode = pos->getNextSibling();
  +
  +				if(0 == nextNode)
   				{
  -					nextNode = pos->getNextSibling();
  +					pos = pos->getParentNode();
   
  -					if(0 == nextNode)
  +					if((startNode == pos) || (0 == pos))
   					{
  -						pos = pos->getParentNode();
  -
  -						if((startNode == pos) || (0 == pos))
  -						{
  -							nextNode = 0;
  -							break;
  -						}
  +						nextNode = 0;
  +						break;
   					}
   				}
   			}
  +		}
   
  -			pos = nextNode;
  -		} // if (fDone == false)
  +		pos = nextNode;
       } // while(0 != pos)
   } // end buildKeysTable method
   
  @@ -283,16 +276,11 @@
   
   
   
  -const NodeRefListBase*
  +const NodeRefListBase&
   KeyTable::getNodeSetByKey(
   					  const XalanDOMString&		name, 
   					  const XalanDOMString&		ref) const
   {
  -	// It makes things much easier if we always return
  -	// a list of nodes.  So this is just an empty one
  -	// to return when the ref is not found.
  -    const MutableNodeRefList*			nl = &s_dummyList;
  -
   	const KeysMapType::const_iterator	i = m_keys.find(name);
   
   	if (i != m_keys.end())
  @@ -303,10 +291,12 @@
   
   		if (j != theMap.end())
   		{
  -			nl = &(*j).second;
  +			return (*j).second;
   		}
   	}
   
  -	return nl;
  +	// It makes things much easier if we always return
  +	// a list of nodes.  So this is just an empty one
  +	// to return when the ref is not found.
  +	return s_dummyList;
   }
  -
  
  
  
  1.9       +17 -19    xml-xalan/c/src/XSLT/KeyTable.hpp
  
  Index: KeyTable.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/KeyTable.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- KeyTable.hpp	2000/08/22 20:21:24	1.8
  +++ KeyTable.hpp	2000/09/19 15:12:01	1.9
  @@ -58,7 +58,7 @@
   #define XALAN_KEYTABLE_HEADER_GUARD 
   
   /**
  - * $Id: KeyTable.hpp,v 1.8 2000/08/22 20:21:24 dbertoni Exp $
  + * $Id: KeyTable.hpp,v 1.9 2000/09/19 15:12:01 dbertoni Exp $
    * 
    * $State: Exp $
    * 
  @@ -107,10 +107,25 @@
   
   #if defined(XALAN_NO_NAMESPACES)
   	typedef vector<KeyDeclaration>			KeyDeclarationVectorType;
  +
  +	typedef map<XalanDOMString,
  +				MutableNodeRefList,
  +				less<XalanDOMString> >		NodeListMapType;
  +
  +	typedef map<XalanDOMString,
  +				NodeListMapType,
  +				less<XalanDOMString> >		KeysMapType;
   #else
   	typedef std::vector<KeyDeclaration>		KeyDeclarationVectorType;
  +
  +	typedef std::map<XalanDOMString,
  +					 MutableNodeRefList>	NodeListMapType;
  +
  +	typedef std::map<XalanDOMString,
  +					 NodeListMapType>		KeysMapType;
   #endif
   
  +
   	/**
   	 * Build a keys table.
   	 *
  @@ -126,7 +141,6 @@
   			XalanNode*							doc,
   			XalanNode*							startNode,
   			const PrefixResolver&				resolver,
  -			const XalanDOMString&				name,
   			const KeyDeclarationVectorType&		keyDeclarations,
   			StylesheetExecutionContext&			executionContext);
   
  @@ -145,7 +159,7 @@
   	 *             attribute on xsl:key
   	 * @return		pointer to nodeset for key 
   	 */
  -	const NodeRefListBase*
  +	const NodeRefListBase&
   	getNodeSetByKey(
   				  const XalanDOMString&		name,
   				  const XalanDOMString&		ref) const;
  @@ -181,22 +195,6 @@
   	 * Thus, for a given key or keyref, look up hashtable by name, 
   	 * look up the nodelist by the given reference.
   	 */
  -
  -#if defined(XALAN_NO_NAMESPACES)
  -	typedef map<XalanDOMString,
  -				MutableNodeRefList,
  -				less<XalanDOMString> >		NodeListMapType;
  -
  -	typedef map<XalanDOMString,
  -				NodeListMapType,
  -				less<XalanDOMString> >		KeysMapType;
  -#else
  -	typedef std::map<XalanDOMString,
  -					 MutableNodeRefList>	NodeListMapType;
  -
  -	typedef std::map<XalanDOMString,
  -					 NodeListMapType>		KeysMapType;
  -#endif
   
   	KeysMapType							m_keys;
   
  
  
  
  1.15      +1 -1      xml-xalan/c/src/XSLT/NodeSorter.cpp
  
  Index: NodeSorter.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/NodeSorter.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- NodeSorter.cpp	2000/08/22 20:21:25	1.14
  +++ NodeSorter.cpp	2000/09/19 15:12:03	1.15
  @@ -349,7 +349,7 @@
   		xpath->execute(node, *theKey.getPrefixResolver(), dummy, m_executionContext));
   	assert(result.get() != 0);
   
  -	const XalanDOMString	theResult = result->str();
  +	const XalanDOMString&	theResult = result->str();
   
   #if defined(XALAN_NO_MUTABLE)
   	((NodeSortKeyCompare*)this)->m_stringResultsCache[xpath][node] = theResult;
  
  
  
  1.36      +30 -88    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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- Stylesheet.cpp	2000/09/05 02:24:53	1.35
  +++ Stylesheet.cpp	2000/09/19 15:12:04	1.36
  @@ -122,7 +122,6 @@
   	m_keyDeclarations(),
   	m_needToBuildKeysTable(false),
   	m_imports(),
  -	m_defaultATXpath(0),
   	m_namespaces(),
   	m_namespaceDecls(),
   	m_tablesAreInvalid(true),
  @@ -326,31 +325,45 @@
   void
   Stylesheet::postConstruction()
   {
  -	// Get any aliases from the imported stylesheets, in reverse order, to
  -	// preserve import precedence.
  +	// Call postConstruction() on any imported stylesheets, the get any aliases
  +	// in reverse order, to preserve import precedence. Also, get any key declarations.
   	const StylesheetVectorType::reverse_iterator	theEnd = m_imports.rend();
   	StylesheetVectorType::reverse_iterator	i = m_imports.rbegin();
   
   	while(i != theEnd)
   	{
  +		(*i)->postConstruction();
  +
   		m_namespacesHandler.copyNamespaceAliases((*i)->getNamespacesHandler());
   
  +		// $$ ToDo: Should we clear the imported stylesheet's key
  +		// declarations after we copy them?
  +		m_keyDeclarations.insert(
  +			m_keyDeclarations.end(),
  +			(*i)->m_keyDeclarations.begin(),
  +			(*i)->m_keyDeclarations.end());
  +
   		++i;
   	}
  +
  +	// We may need to build keys, since we may have inherited them from
  +	// our imports.
  +	if (m_needToBuildKeysTable == false && m_keyDeclarations.size() > 0)
  +	{
  +		m_needToBuildKeysTable = true;
  +	}
   
  -	// Call postConstruction() on our own handler...
  +	// Call postConstruction() on our own namespaces handler...
   	m_namespacesHandler.postConstruction();
   
   	ElemTemplateElement* node = m_firstTemplate;
   
  -    for (; node != 0; node = node->getNextSiblingElem()) 
  +    for (; node != 0; node = node->getNextSiblingElem())
       {
   		node->postConstruction(m_namespacesHandler);
   	}
   
  -	node = m_wrapperlessTemplate;
  -
  -    for (; node != 0; node = node->getNextSiblingElem())
  +    for (node = m_wrapperlessTemplate; node != 0; node = node->getNextSiblingElem())
       {
   		node->postConstruction(m_namespacesHandler);
   	}
  @@ -653,10 +666,11 @@
   			case XalanNode::ELEMENT_NODE:
   				{
   					const XalanDOMString	targetName = DOMServices::getLocalNameOfNode(*targetNode);
  +
   					matchPatternList = locateMatchPatternList2(targetName, true);
   				}
   				break;
  -				
  +
   			case XalanNode::PROCESSING_INSTRUCTION_NODE:
   			case XalanNode::ATTRIBUTE_NODE:
   				matchPatternList = locateMatchPatternList2(targetNode->getNodeName(), true);
  @@ -664,11 +678,11 @@
   
   			case XalanNode::CDATA_SECTION_NODE:
   			case XalanNode::TEXT_NODE:
  -				matchPatternList = locateMatchPatternList2(XPath::PSEUDONAME_TEXT, false);
  +				matchPatternList = locateMatchPatternList2(XPath::PSEUDONAME_TEXT, true);
   				break;
   
   			case XalanNode::COMMENT_NODE:
  -				matchPatternList = locateMatchPatternList2(XPath::PSEUDONAME_COMMENT, false);
  +				matchPatternList = locateMatchPatternList2(XPath::PSEUDONAME_COMMENT, true);
   				break;
   
   			case XalanNode::DOCUMENT_NODE:
  @@ -678,10 +692,10 @@
   			case XalanNode::DOCUMENT_FRAGMENT_NODE:
   				matchPatternList = locateMatchPatternList2(XPath::PSEUDONAME_ANY, false);
   				break;
  -				
  +
   			default:
   				{
  -					matchPatternList = locateMatchPatternList2(targetNode->getNodeName(), false);
  +					matchPatternList = locateMatchPatternList2(targetNode->getNodeName(), true);
   				}
   			}
   
  @@ -779,9 +793,9 @@
   					if(theCurrentEntry == theTableEnd &&
   					   equals(matchPat->getTargetString(),
   							  Constants::PSEUDONAME_ANY) == false
  -						&& (XalanNode::ELEMENT_NODE == targetNodeType || 
  -							XalanNode::ATTRIBUTE_NODE == targetNodeType ||
  -							XalanNode::PROCESSING_INSTRUCTION_NODE == targetNodeType)
  +//						&& (XalanNode::ELEMENT_NODE == targetNodeType || 
  +//							XalanNode::ATTRIBUTE_NODE == targetNodeType ||
  +//							XalanNode::PROCESSING_INSTRUCTION_NODE == targetNodeType)
   						)
   					{
   						{
  @@ -1000,77 +1014,6 @@
   
   
   
  -const NodeRefListBase*
  -Stylesheet::getNodeSetByKey(
  -			XalanNode*					doc,
  -			const XalanDOMString&		name,
  -			const XalanDOMString&		ref,
  -			const PrefixResolver&		resolver,
  -			StylesheetExecutionContext&	executionContext,
  -			KeyTablesTableType& 		theKeysTable) const
  -{
  -	const NodeRefListBase *nl = 0;
  -
  -	if(0 != m_keyDeclarations.size())
  -	{
  -		bool	foundDoc = false;
  -
  -		const KeyTablesTableType::const_iterator	i =
  -			theKeysTable.find(doc);
  -
  -		if (i != theKeysTable.end())
  -		{
  -			nl = (*i).second->getNodeSetByKey(name, ref);
  -
  -			if (nl->getLength() > 0)
  -			{
  -				foundDoc = true;
  -			}
  -		}
  -
  -		if((0 == nl || nl->getLength() == 0) && !foundDoc && m_needToBuildKeysTable)
  -		{
  -			KeyTable* const kt =
  -				new KeyTable(doc,
  -							 doc,
  -							 resolver,
  -							 name,
  -							 m_keyDeclarations,
  -							 executionContext);
  -			assert(doc == kt->getDocKey());
  -
  -			theKeysTable[doc] = kt;
  -
  -			foundDoc = true;
  -
  -			nl = kt->getNodeSetByKey(name, ref);
  -		}
  -	}
  -	
  -	// If the nodelist is null at this point, it should 
  -	// mean there wasn't an xsl:key declared with the 
  -	// given name.	So go up the import hierarchy and 
  -	// see if one of the imported stylesheets declared it.
  -	if(0 == nl)
  -	{
  -		const int	nImports = m_imports.size();
  -
  -		for(int i = 0; i < nImports; i++)
  -		{
  -			const Stylesheet*	const	stylesheet = m_imports[i];
  -
  -			nl = stylesheet->getNodeSetByKey(doc, name, ref, resolver, executionContext, theKeysTable);
  -
  -			if(0 != nl)
  -				break;
  -		}
  -	}
  -
  -	return nl;
  -}
  -
  -
  -
   /**
    * Construct a match pattern from a pattern and template.
    * @param pat For now a Nodelist that contains old-style element patterns.
  @@ -1227,7 +1170,6 @@
   
   	for(unsigned int i = 0; i < nAttrs; i++)
   	{
  -
   		const XalanDOMChar* const	aname = atts.getName(i);
   
   		if(equals(aname, Constants::ATTRNAME_STYLESHEET_PREFIX) == true)
  
  
  
  1.26      +46 -118   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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Stylesheet.hpp	2000/08/28 01:19:41	1.25
  +++ Stylesheet.hpp	2000/09/19 15:12:05	1.26
  @@ -138,12 +138,14 @@
   	typedef vector<ElemAttributeSet*> 				AttributeSetMapType;
   	typedef vector<ElemVariable*> 					ElemVariableVectorType;
   	typedef vector<KeyDeclaration>					KeyDeclarationVectorType;
  -	typedef vector<KeyTable*> 						KeyTableVectorType;
  +//	typedef map<XalanDOMString,
  +//				KeyTable*,
  +//				less<XalanDOMString> >				KeysMapType;
   	typedef map<const XalanNode*,
   				KeyTable*,
   				less<const XalanNode*> >			KeyTablesTableType;
   	typedef vector<QName> 							QNameVectorType;
  -	typedef vector<const Stylesheet*>				StylesheetVectorType;
  +	typedef vector<Stylesheet*>						StylesheetVectorType;
   	typedef vector<XalanDOMString>					URLStackType;
   	typedef vector<const XPath*>					XPathVectorType;
   	typedef vector<ElemDecimalFormat*>				ElemDecimalFormatVectorType;
  @@ -154,10 +156,10 @@
   	typedef std::vector<ElemAttributeSet*> 					AttributeSetMapType;
   	typedef std::vector<ElemVariable*> 						ElemVariableVectorType;
   	typedef std::vector<KeyDeclaration>						KeyDeclarationVectorType;
  -	typedef std::vector<KeyTable*> 							KeyTableVectorType;
  +//	typedef std::map<XalanDOMString, KeyTable*>				KeysMapType;
   	typedef std::map<const XalanNode*, KeyTable*>			KeyTablesTableType;
   	typedef std::vector<QName> 								QNameVectorType;
  -	typedef std::vector<const Stylesheet*>					StylesheetVectorType;
  +	typedef std::vector<Stylesheet*>						StylesheetVectorType;
   	typedef std::vector<XalanDOMString>						URLStackType;
   	typedef std::vector<const XPath*>						XPathVectorType;
   	typedef std::vector<ElemDecimalFormat*>					ElemDecimalFormatVectorType;
  @@ -221,29 +223,6 @@
   	}
   
   	/**
  -	 * Retrieve the default XPath for apply-template
  -	 * 
  -	 * @return pointer to default XPath
  -	 */
  -	const XPath*
  -	getDefaultATXpath() const
  -	{
  -		return m_defaultATXpath;
  -	}
  -
  -	/**
  -	 * Set the default XPath for apply-template
  -	 * 
  -	 * @param defaultATXpath pointer to new default XPath
  -	 */
  -	void
  -	setDefaultATXpath(XPath* defaultATXpath) 
  -	{
  -		m_defaultATXpath = defaultATXpath;
  -	}
  -
  -
  -	/**
   	 * Retrieve the stack of namespace lists
   	 * 
   	 * @return vector of namespace vectors
  @@ -570,8 +549,8 @@
   	 */
   	void
   	addImport(
  -			const Stylesheet*	theStylesheet,
  -			bool				fFront)
  +			Stylesheet*		theStylesheet,
  +			bool			fFront)
   	{
   		m_imports.insert(fFront ? m_imports.begin() : m_imports.end(), theStylesheet);
   	}
  @@ -873,29 +852,6 @@
   			bool					tryWildCard = false) const;
   
   	/**
  -	 * Given a valid element key, return the corresponding node list.
  -	 *
  -	 * @param doc			   source document
  -	 * @param name			   name of the key, which must match the 'name'
  -	 *						   attribute on xsl:key
  -	 * @param ref			   value that must match the value found by the
  -	 *						   'match' attribute on xsl:key
  -	 * @param resolver		   resolver for namespace resolution
  -	 * @param executionContext current execution context
  -	 * @return if the name was not declared with xsl:key, this will return
  -	 * null, if the identifier is not found, it will return an empty node set,
  -	 * otherwise it will return a nodeset of nodes.
  -	 */
  -	const NodeRefListBase*
  -	getNodeSetByKey(
  -			XalanNode*					doc,
  -			const XalanDOMString&		name,
  -			const XalanDOMString&		ref,
  -			const PrefixResolver&		resolver,
  -			StylesheetExecutionContext&	executionContext,
  -			KeyTablesTableType&			theKeysTable) const;
  -
  -	/**
   	 * Add an extension namespace handler. This provides methods for calling
   	 * an element extension as well as for function calls (which is passed
   	 * on to XPath).
  @@ -1148,23 +1104,27 @@
   
   protected:
   
  -  /**
  -	* The root of the stylesheet, where all the tables common to all
  -	* stylesheets are kept.
  -   */
  +	/**
  +	 * The root of the stylesheet tree.
  +	 */
   	StylesheetRoot& 					m_stylesheetRoot;
   
  -  /**
  -   * Reference back to the owning XSLTProcessor object.
  -	* JMD: This has to be a pointer,not a reference because of setXSLProcessor
  -   */
  -//	XSLTEngineImpl* m_processor;
  +	/**
  +	 * This is set to true if an xsl:key directive is found.
  +	 */
  +	bool								m_needToBuildKeysTable;
   
   	/**
   	 * The base URL of the XSL document.
   	 */
   	XalanDOMString						m_baseIdent;
   
  +	/**
  +	 * Table of KeyDeclaration objects, which are set by the 
  +	 * xsl:key element.
  +	 */
  +	KeyDeclarationVectorType			m_keyDeclarations;
  +
   private:	
   
   	// Not defined...
  @@ -1180,155 +1140,123 @@
   	 * The full XSLT Namespace URI.  To be replaced by the one actually
   	 * found.
   	 */
  -	XalanDOMString						m_XSLTNamespaceURI;
  +	XalanDOMString							m_XSLTNamespaceURI;
   
   	/**
   	 * A lookup table of all space preserving elements.
   	 */
  -	XPathVectorType 					m_whitespacePreservingElements;
  +	XPathVectorType 						m_whitespacePreservingElements;
     
   	/**
   	 * A lookup table of all space stripping elements.
   	 */
  -	XPathVectorType 					m_whitespaceStrippingElements;
  +	XPathVectorType 						m_whitespaceStrippingElements;
   
   	/**
  -	 * Table of KeyDeclaration objects, which are set by the 
  -	 * xsl:key element.
  -	 */
  -	KeyDeclarationVectorType			m_keyDeclarations;
  -
  -	/**
  -	 * This is set to true if an xsl:key directive is found.
  -	 * Mainly for use by the XMLParserLiaison classes for 
  -	 * optimized processing of ids.
  -	 * @serial
  -	 */
  -	bool								m_needToBuildKeysTable;
  -
  -	/**
   	 * A vector of the -imported- XSL Stylesheets.
  -	 */
  -	StylesheetVectorType				m_imports;
  -
  -	/**
  -	 * The default template to use for xsl:apply-templates when 
  -	 * a select attribute is not found.
   	 */
  -	const XPath*						m_defaultATXpath;
  +	StylesheetVectorType					m_imports;
   
   	/**
   	 * A stack to keep track of the result tree namespaces.
   	 */
  -	NamespacesStackType 				m_namespaces;
  +	NamespacesStackType 					m_namespaces;
   
   	/** 
   	 * A list of namespace declarations,
   	 * for mapping from prefix to namespace URI.
   	 */
  -	NamespaceVectorType 				m_namespaceDecls;
  +	NamespaceVectorType 					m_namespaceDecls;
   
   	/**
   	 * This is pushed on the m_resultNameSpaces stack 'till a xmlns attribute is
   	 * found.
   	 */
  -	static const NamespaceVectorType	s_emptyNamespace;
  +	static const NamespaceVectorType		s_emptyNamespace;
   
   	/**
   	 * Tells if the stylesheet tables need to be rebuilt.
   	 */
  -	bool								m_tablesAreInvalid;
  +	bool									m_tablesAreInvalid;
   
   	/**
   	 * Tells if the stylesheet is without an xsl:stylesheet and xsl:template
   	 * wrapper.
   	 */
  -	bool						m_isWrapperless;
  +	bool									m_isWrapperless;
   
   	/**
   	 * The manufactured template if there is no wrapper.
   	 */
  -	ElemTemplate*				m_wrapperlessTemplate;
  +	ElemTemplate*							m_wrapperlessTemplate;
     
   	/**
   	 * The table of extension namespaces.
   	 */
  -	ExtensionNamespacesMapType	m_extensionNamespaces;
  +	ExtensionNamespacesMapType				m_extensionNamespaces;
   
     
   	/**
   	 * The first template of the template children.
   	 */
  -	ElemTemplateElement*		m_firstTemplate;
  +	ElemTemplateElement*					m_firstTemplate;
     
   	/**
   	 * A stack of who's including who is needed in order to support "It is an
   	 * error if a stylesheet directly or indirectly includes itself."
   	 */
  -	URLStackType				m_includeStack;
  +	URLStackType							m_includeStack;
   
   	/** 
   	 * Tell if this stylesheet has the default space handling
   	 * turned off or on according to the xml:space attribute.
   	 * @serial
   	 */
  -	bool						m_defaultSpace;
  +	bool									m_defaultSpace;
     
   	/**
   	 * Keyed on string macro names, and holding values that are macro elements
   	 * in the XSL DOM tree. Initialized in initMacroLookupTable, and used in
   	 * findNamedTemplate.
   	 */
  -	ElemTemplateMapType			m_namedTemplates;
  +	ElemTemplateMapType						m_namedTemplates;
     
   	/**
   	 * Table for defined constants, keyed on the names.
   	 */
  -	ElemVariableVectorType		m_topLevelVariables;
  +	ElemVariableVectorType					m_topLevelVariables;
   
   
   	/**
   	 * The version of XSL that was declared.
   	 */
  -	double						m_XSLTVerDeclared;
  -
  -	const bool	m_isRoot;
  +	double									m_XSLTVerDeclared;
   
  -	/**
  -	 * This table is keyed on the target elements 
  -	 * of patterns, and contains linked lists of
  -	 * the actual patterns that match the target element
  -	 * to some degree of specifity.
  -	 */
  +	const bool								m_isRoot;
   
   	/**
   	 * This table is keyed on the target elements of patterns, and contains linked
   	 * lists of the actual patterns that match the target element to some degree
   	 * of specifity.
   	 */
  -	PatternTableMapType 	m_patternTable;
  +	PatternTableMapType 					m_patternTable;
   
   	/**
   	 * Table of attribute sets, keyed by set name.
   	 */
  -	AttributeSetMapType 	m_attributeSets;
  +	AttributeSetMapType 					m_attributeSets;
   
  -	XalanNodeListSurrogate	m_surrogateChildren;
  +	XalanNodeListSurrogate					m_surrogateChildren;
   
  -	XalanEmptyNamedNodeMap	m_fakeAttributes;
  +	XalanEmptyNamedNodeMap					m_fakeAttributes;
   
  -	ElemDecimalFormatVectorType		m_elemDecimalFormats;
  +	ElemDecimalFormatVectorType				m_elemDecimalFormats;
   
  -	StringToStringMapType			m_prefixAliases;
  +	StringToStringMapType					m_prefixAliases;
   
  -	NamespacesHandler		m_namespacesHandler;
  +	NamespacesHandler						m_namespacesHandler;
   };
   
   
   
   #endif	// XALAN_STYLESHEET_HEADER_GUARD
  -
  -
  -/*
  - *	$ Log: $
  - */
  
  
  
  1.14      +7 -7      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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StylesheetConstructionContextDefault.hpp	2000/08/22 20:21:27	1.13
  +++ StylesheetConstructionContextDefault.hpp	2000/09/19 15:12:06	1.14
  @@ -218,6 +218,13 @@
   	virtual double
   	getXSLTVersionSupported() const;
   
  +#if defined(XALAN_NO_NAMESPACES)
  +	typedef set<StylesheetRoot*,
  +				less<StylesheetRoot*> >		StylesheetSetType;
  +#else
  +	typedef std::set<StylesheetRoot*>		StylesheetSetType;
  +#endif
  +
   private:
   
   	XSLTEngineImpl&						m_processor;
  @@ -225,13 +232,6 @@
   	XPathFactory&						m_xpathFactory;
   
   	typedef XalanAutoPtr<XPathProcessor>	XPathProcessAutoPtr;
  -
  -#if defined(XALAN_NO_NAMESPACES)
  -	typedef set<StylesheetRoot*,
  -				less<StylesheetRoot*> >		StylesheetSetType;
  -#else
  -	typedef std::set<StylesheetRoot*>		StylesheetSetType;
  -#endif
   
   	XPathProcessAutoPtr					m_xpathProcessor;
   
  
  
  
  1.31      +38 -24    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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- StylesheetExecutionContext.hpp	2000/08/28 01:19:41	1.30
  +++ StylesheetExecutionContext.hpp	2000/09/19 15:12:06	1.31
  @@ -1514,6 +1514,41 @@
   	virtual	void
   	endConstruction(const KeyDeclaration& keyDeclaration) = 0;
   
  +	/**
  +	 * Create a PrintWriter for the provided stream.
  +	 * 
  +	 * @param theTextOutputStream The output stream for the PrintWriter.
  +	 * @return The new instance.
  +	 */
  +	virtual PrintWriter*
  +	createPrintWriter(TextOutputStream*		theTextOutputStream) = 0;
  +
  +	/**
  +	 * Create a PrintWriter.  Create an appropriate output stream
  +	 * using the provided file name and encoding.
  +	 * 
  +	 * @param theFileName The file name for the output stream
  +	 * @param theEncoding The encoding for the output stream
  +	 * @return The new instance.
  +	 */
  +	virtual PrintWriter*
  +	createPrintWriter(
  +			const XalanDOMString&		theFileName,
  +			const XalanDOMString&		theEncoding) = 0;
  +
  +	/**
  +	 * Create a PrintWriter using the provided ostream instance.
  +	 * 
  +	 * @param ostream The output stream for the PrintWriter.
  +	 * @return The new instance.
  +	 */
  +	virtual PrintWriter*
  +#if defined(XALAN_NO_NAMESPACES)
  +	createPrintWriter(ostream&			theStream) = 0;
  +#else
  +	createPrintWriter(std::ostream&		theStream) = 0;
  +#endif
  +
   	// These interfaces are inherited from XPathExecutionContext...
   
   	virtual void
  @@ -1619,12 +1654,13 @@
   	virtual bool
   	getProcessNamespaces() const = 0;
   
  -	virtual const NodeRefListBase*
  +	virtual void
   	getNodeSetByKey(
   			XalanNode*				doc,
   			const XalanDOMString&	name,
   			const XalanDOMString&	ref,
  -			const PrefixResolver&	resolver) = 0;
  +			const PrefixResolver&	resolver,
  +			MutableNodeRefList&		nodelist) = 0;
   
   	virtual const XObject*
   	getVariable(const QName&	name) const = 0;
  @@ -1676,20 +1712,6 @@
   	virtual const XalanDecimalFormatSymbols*
   	getDecimalFormatSymbols(const XalanDOMString&	name) = 0;
   
  -	virtual PrintWriter*
  -	createPrintWriter(TextOutputStream*		theTextOutputStream) = 0;
  -
  -	virtual PrintWriter*
  -	createPrintWriter(
  -			const XalanDOMString&		theFileName,
  -			const XalanDOMString&		theEncoding) = 0;
  -
  -	virtual PrintWriter*
  -#if defined(XALAN_NO_NAMESPACES)
  -	createPrintWriter(ostream&			theStream) = 0;
  -#else
  -	createPrintWriter(std::ostream&		theStream) = 0;
  -#endif
   
   	// These interfaces are inherited from ExecutionContext...
   
  @@ -1710,14 +1732,6 @@
   			const XalanDOMString&	msg,
   			const XalanNode* 		sourceNode = 0,
   			const XalanNode*		styleNode = 0) const = 0;
  -	
  -	virtual KeyTable*
  -	getKeyTable(const XalanNode*	doc) const = 0;
  -
  -	virtual void
  -	setKeyTable(
  -			KeyTable*			keytable,
  -			const XalanNode*	doc) = 0;
   };
   
   
  
  
  
  1.35      +16 -99    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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- StylesheetExecutionContextDefault.cpp	2000/09/05 02:24:53	1.34
  +++ StylesheetExecutionContextDefault.cpp	2000/09/19 15:12:07	1.35
  @@ -283,15 +283,9 @@
   			const XalanDOMChar*		theNewType,
   			const XalanDOMChar*		theNewValue)
   {
  -	// Make a copy of the attribute list, and modify it, to be more exception-safe.
  -	AttributeListImpl	thePendingAttributes(m_xsltProcessor.getPendingAttributes());
  -
  -	// Remove the old attribute, then add the new one...
  -	// thePendingAttributes.removeAttribute(theName);
  -	thePendingAttributes.addAttribute(theName, theNewType, theNewValue);
  -
  -	// Set the new pending attributes...
  -	m_xsltProcessor.setPendingAttributes(thePendingAttributes);
  +	// Remove the old attribute, then add the new one.  AttributeListImpl::addAttribute()
  +	// does this for us.
  +	m_xsltProcessor.getPendingAttributes().addAttribute(theName, theNewType, theNewValue);
   }
   
   
  @@ -1331,6 +1325,10 @@
   void
   StylesheetExecutionContextDefault::reset()
   {
  +#if !defined(XALAN_NO_NAMESPACES)
  +	using std::for_each;
  +#endif
  +
   	assert(m_elementRecursionStack.size() == 0);
   
   	// Reset the support objects...
  @@ -1338,10 +1336,6 @@
   
   	m_xsltProcessor.reset();
   
  -#if !defined(XALAN_NO_NAMESPACES)
  -	using std::for_each;
  -#endif
  -	
   	for_each(m_formatterListeners.begin(),
   			 m_formatterListeners.end(),
   			 DeleteFunctor<FormatterListener>());
  @@ -1625,16 +1619,17 @@
   
   
   
  -const NodeRefListBase*
  +void
   StylesheetExecutionContextDefault::getNodeSetByKey(
   			XalanNode*				doc,
   			const XalanDOMString&	name,
   			const XalanDOMString&	ref,
  -			const PrefixResolver&	resolver)
  +			const PrefixResolver&	resolver,
  +			MutableNodeRefList&		nodelist)
   {
   	assert(m_stylesheetRoot != 0);
   
  -	return m_stylesheetRoot->getNodeSetByKey(doc, name, ref, resolver, *this, m_keyTables);
  +	m_stylesheetRoot->getNodeSetByKey(doc, name, ref, resolver, nodelist, *this, m_keyTables);
   }
   
   
  @@ -1950,28 +1945,12 @@
   
   
   
  -// I should be able to make this out of a
  -// bunch of compose<> and select2nd<> adapters...
  -template<class Type>
  -class XPathCacheReturnFunctor
  +void
  +StylesheetExecutionContextDefault::XPathCacheReturnFunctor::operator()(const XPathCacheMapType::value_type&		theCacheEntry)
   {
  -public:
  -
  -	XPathCacheReturnFunctor(XSLTEngineImpl&		xsltProcessor) :
  -		m_xsltProcessor(xsltProcessor)
  -	{
  -	}
  -
  -	void
  -	operator()(const Type&	theCacheEntry)
  -	{
  -		m_xsltProcessor.returnXPath(theCacheEntry.second.first);
  -	}
  -
  -private:
  +	m_xsltProcessor.returnXPath(theCacheEntry.second.first);
  +}
   
  -	XSLTEngineImpl&		m_xsltProcessor;
  -};
   
   
   
  @@ -1984,41 +1963,13 @@
   
   	for_each(m_matchPatternCache.begin(),
   			 m_matchPatternCache.end(),
  -			 XPathCacheReturnFunctor<XPathCacheMapType::value_type>(m_xsltProcessor));
  +			 XPathCacheReturnFunctor(m_xsltProcessor));
   
   	m_matchPatternCache.clear();
   }
   
   
   
  -// I should be able to make this out of a
  -// bunch of compose<> and select2nd<> adapters...
  -template<class Type>
  -class XPathCacheEarliestPredicate
  -{
  -public:
  -
  -	XPathCacheEarliestPredicate(XSLTEngineImpl&		xsltProcessor) :
  -		m_xsltProcessor(xsltProcessor)
  -	{
  -	}
  -
  -	void
  -	operator()(const Type&	theCacheEntry)
  -	{
  -		m_xsltProcessor.returnXPath(theCacheEntry.second.first);
  -	}
  -
  -private:
  -
  -	XSLTEngineImpl&		m_xsltProcessor;
  -};
  -
  -
  -
  -
  -
  -
   void
   StylesheetExecutionContextDefault::addToXPathCache(
   			const XalanDOMString&	pattern,
  @@ -2071,37 +2022,3 @@
   	// Add the XPath with the current clock
   	m_matchPatternCache.insert(XPathCacheMapType::value_type(pattern, XPathCacheEntry(theXPath, addClock)));
   }
  -
  -
  -
  -
  -KeyTable*
  -StylesheetExecutionContextDefault::getKeyTable(const XalanNode*	doc) const
  -{
  -	const KeyTablesTableType::const_iterator		i =
  -					m_keyTables.find(doc);
  -
  -	if (i == m_keyTables.end())
  -	{
  -		return 0;
  -	}
  -	else
  -	{
  -		return (*i).second;
  -	}
  -}
  -
  -
  -
  -void
  -StylesheetExecutionContextDefault::setKeyTable(
  -			KeyTable*			keytable,
  -			const XalanNode*	doc)
  -{
  -	// Get rid of any existing keytable
  -	delete m_keyTables[doc];
  -
  -	m_keyTables[doc] = keytable;
  -}
  -
  -
  
  
  
  1.32      +70 -60    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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- StylesheetExecutionContextDefault.hpp	2000/08/28 01:19:41	1.31
  +++ StylesheetExecutionContextDefault.hpp	2000/09/19 15:12:10	1.32
  @@ -98,6 +98,37 @@
   {
   public:
   
  +#if defined(XALAN_NO_NAMESPACES)
  +	typedef deque<const ElemTemplateElement*>			ElementRecursionStackType;
  +	typedef set<FormatterListener*,
  +				less<FormatterListener*> >				FormatterListenerSetType;
  +	typedef set<PrintWriter*,
  +				less<PrintWriter*> >					PrintWriterSetType;
  +	typedef set<TextOutputStream*,
  +				less<TextOutputStream*> >				TextOutputStreamSetType;
  +	typedef set<const KeyDeclaration*,
  +				less<const KeyDeclaration*> >			KeyDeclarationSetType;
  +	typedef vector<const XObject*>						VariablesCollectionType;
  +	typedef vector<VariablesCollectionType>				LiveVariablesStackType;
  +	typedef pair<const XPath*, clock_t>					XPathCacheEntry;
  +	typedef map<XalanDOMString,
  +				XPathCacheEntry,
  +				less<XalanDOMString> >					XPathCacheMapType;
  +#else
  +	typedef std::deque<const ElemTemplateElement*>		ElementRecursionStackType;
  +	typedef std::set<FormatterListener*>				FormatterListenerSetType;
  +	typedef std::set<PrintWriter*>						PrintWriterSetType;
  +	typedef std::set<TextOutputStream*>					TextOutputStreamSetType;
  +	typedef std::set<const KeyDeclaration*>				KeyDeclarationSetType;
  +	typedef std::vector<const XObject*>					VariablesCollectionType;
  +	typedef std::vector<VariablesCollectionType>		LiveVariablesStackType;
  +	typedef std::pair<const XPath*, clock_t>			XPathCacheEntry;
  +	typedef std::map<XalanDOMString, XPathCacheEntry>	XPathCacheMapType;
  +#endif
  +
  +	typedef Stylesheet::KeyTablesTableType				KeyTablesTableType;
  +
  +
   	StylesheetExecutionContextDefault(
   			XSLTEngineImpl&			xsltProcessor,
   			XPathEnvSupport&		theXPathEnvSupport,
  @@ -535,6 +566,24 @@
   	virtual	void
   	endConstruction(const KeyDeclaration& keyDeclaration);
   
  +	virtual const XalanDecimalFormatSymbols*
  +	getDecimalFormatSymbols(const XalanDOMString&	name);
  +
  +	virtual PrintWriter*
  +	createPrintWriter(TextOutputStream*		theTextOutputStream);
  +
  +	virtual PrintWriter*
  +	createPrintWriter(
  +			const XalanDOMString&		theFileName,
  +			const XalanDOMString&		theEncoding);
  +
  +	virtual PrintWriter*
  +#if defined(XALAN_NO_NAMESPACES)
  +	createPrintWriter(ostream&			theStream);
  +#else
  +	createPrintWriter(std::ostream&		theStream);
  +#endif
  +
   	// These interfaces are inherited from XPathExecutionContext...
   
   	virtual void
  @@ -640,12 +689,13 @@
   	virtual bool
   	getProcessNamespaces() const;
   
  -	virtual const NodeRefListBase*
  +	virtual void
   	getNodeSetByKey(			
   			XalanNode*				doc,
   			const XalanDOMString&	name,
   			const XalanDOMString&	ref,
  -			const PrefixResolver&	resolver);
  +			const PrefixResolver&	resolver,
  +			MutableNodeRefList&		nodelist);
   
   	virtual const XObject*
   	getVariable(const QName&	name) const;
  @@ -694,35 +744,6 @@
   			XalanDocument*			theDocument);
   
   
  -	virtual const XalanDecimalFormatSymbols*
  -	getDecimalFormatSymbols(const XalanDOMString&	name);
  -
  -	virtual PrintWriter*
  -	createPrintWriter(TextOutputStream*		theTextOutputStream);
  -
  -	virtual PrintWriter*
  -	createPrintWriter(
  -			const XalanDOMString&		theFileName,
  -			const XalanDOMString&		theEncoding);
  -
  -	virtual PrintWriter*
  -#if defined(XALAN_NO_NAMESPACES)
  -	createPrintWriter(ostream&			theStream);
  -#else
  -	createPrintWriter(std::ostream&		theStream);
  -#endif
  -
  -	// These interfaces are inherited from StylesheetExecutionContext...
  -
  -	virtual KeyTable*
  -	getKeyTable(const XalanNode*	doc) const;
  -
  -	virtual void
  -	setKeyTable(
  -			KeyTable*			keytable,
  -			const XalanNode*	doc);
  -
  -
   	// These interfaces are inherited from ExecutionContext...
   
   	virtual void
  @@ -743,6 +764,24 @@
   			const XalanNode* 		sourceNode = 0,
   			const XalanNode*		styleNode = 0) const;
   
  +
  +	class XPathCacheReturnFunctor
  +	{
  +	public:
  +
  +		XPathCacheReturnFunctor(XSLTEngineImpl&		xsltProcessor) :
  +			m_xsltProcessor(xsltProcessor)
  +		{
  +		}
  +
  +		void
  +		operator()(const XPathCacheMapType::value_type&		theCacheEntry);
  +
  +	private:
  +
  +		XSLTEngineImpl&		m_xsltProcessor;
  +	};
  +
   private:
   
   	/**
  @@ -791,35 +830,6 @@
   	XSLTEngineImpl&					m_xsltProcessor;
   
   	XalanNode*						m_rootDocument;
  -
  -#if defined(XALAN_NO_NAMESPACES)
  -	typedef deque<const ElemTemplateElement*>			ElementRecursionStackType;
  -	typedef set<FormatterListener*,
  -				less<FormatterListener*> >				FormatterListenerSetType;
  -	typedef set<PrintWriter*,
  -				less<PrintWriter*> >					PrintWriterSetType;
  -	typedef set<TextOutputStream*,
  -				less<TextOutputStream*> >				TextOutputStreamSetType;
  -	typedef set<const KeyDeclaration*,
  -				less<const KeyDeclaration*> >			KeyDeclarationSetType;
  -	typedef vector<const XObject*>						VariablesCollectionType;
  -	typedef vector<VariablesCollectionType>				LiveVariablesStackType;
  -	typedef pair<const XPath*, clock_t>					XPathCacheEntry;
  -	typedef map<XalanDOMString,
  -				XPathCacheEntry,
  -				less<XalanDOMString> >					XPathCacheMapType;
  -#else
  -	typedef std::deque<const ElemTemplateElement*>		ElementRecursionStackType;
  -	typedef std::set<FormatterListener*>				FormatterListenerSetType;
  -	typedef std::set<PrintWriter*>						PrintWriterSetType;
  -	typedef std::set<TextOutputStream*>					TextOutputStreamSetType;
  -	typedef std::set<const KeyDeclaration*>				KeyDeclarationSetType;
  -	typedef std::vector<const XObject*>					VariablesCollectionType;
  -	typedef std::vector<VariablesCollectionType>		LiveVariablesStackType;
  -	typedef std::pair<const XPath*, clock_t>			XPathCacheEntry;
  -	typedef std::map<XalanDOMString, XPathCacheEntry>	XPathCacheMapType;
  -#endif
  -	typedef Stylesheet::KeyTablesTableType				KeyTablesTableType;
   
   	enum { eDefaultVariablesCollectionSize = 10,
   		   eXPathCacheMax = 50,
  
  
  
  1.43      +2 -4      xml-xalan/c/src/XSLT/StylesheetHandler.cpp
  
  Index: StylesheetHandler.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetHandler.cpp,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- StylesheetHandler.cpp	2000/09/05 02:24:53	1.42
  +++ StylesheetHandler.cpp	2000/09/19 15:12:11	1.43
  @@ -181,7 +181,7 @@
   	// Clean up the whitespace elements.
   	for_each(m_whiteSpaceElems.begin(),
   			 m_whiteSpaceElems.end(),
  -			 DeleteFunctor<ElemTemplateElement>());
  +			 DeleteFunctor<ElemTextLiteral>());
   
   	// Clean up the stray elements.
   	for_each(m_strayElements.begin(),
  @@ -276,7 +276,7 @@
   		// Clean up the whitespace elements.
   		for_each(m_whiteSpaceElems.begin(),
   				 m_whiteSpaceElems.end(),
  -				 DeleteFunctor<ElemTemplateElement>());
  +				 DeleteFunctor<ElemTextLiteral>());
   
   		m_whiteSpaceElems.clear();
   
  @@ -1188,8 +1188,6 @@
   			StylesheetHandler tp(*importedStylesheet.get(), m_constructionContext);
   
   			m_constructionContext.parseXML(hrefUrl, &tp, 0);
  -
  -			importedStylesheet->postConstruction();
   
   			// Add it to the front of the imports, releasing the XalanAutoPtr...
   			m_stylesheet.addImport(importedStylesheet.release(), true);
  
  
  
  1.24      +44 -0     xml-xalan/c/src/XSLT/StylesheetRoot.cpp
  
  Index: StylesheetRoot.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetRoot.cpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- StylesheetRoot.cpp	2000/09/05 02:24:53	1.23
  +++ StylesheetRoot.cpp	2000/09/19 15:12:14	1.24
  @@ -592,3 +592,47 @@
   	assert(m_defaultTextRule != 0);
   	assert(m_defaultRootRule != 0);
   }
  +
  +
  +
  +void
  +StylesheetRoot::getNodeSetByKey(
  +			XalanNode*						doc,
  +			const XalanDOMString&			name,
  +			const XalanDOMString&			ref,
  +			const PrefixResolver&			resolver,
  +			MutableNodeRefList&				nodelist,
  +			StylesheetExecutionContext&		executionContext,
  +			KeyTablesTableType& 			theKeysTable) const
  +{
  +	if(m_needToBuildKeysTable == true)
  +	{
  +		assert(0 != m_keyDeclarations.size());
  +
  +		const KeyTablesTableType::const_iterator	i =
  +			theKeysTable.find(doc);
  +
  +		if (i != theKeysTable.end())
  +		{
  +			const NodeRefListBase&	nl = (*i).second->getNodeSetByKey(name, ref);
  +
  +			nodelist.addNodesInDocOrder(nl, executionContext);
  +		}
  +		else
  +		{
  +			KeyTable* const kt =
  +				new KeyTable(doc,
  +							 doc,
  +							 resolver,
  +							 m_keyDeclarations,
  +							 executionContext);
  +			assert(doc == kt->getDocKey());
  +
  +			theKeysTable[doc] = kt;
  +
  +			const NodeRefListBase&	nl = kt->getNodeSetByKey(name, ref);
  +
  +			nodelist.addNodesInDocOrder(nl, executionContext);
  +		}
  +	}
  +}
  
  
  
  1.12      +22 -0     xml-xalan/c/src/XSLT/StylesheetRoot.hpp
  
  Index: StylesheetRoot.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetRoot.hpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StylesheetRoot.hpp	2000/08/01 19:44:34	1.11
  +++ StylesheetRoot.hpp	2000/09/19 15:12:16	1.12
  @@ -417,6 +417,28 @@
   		return m_cdataSectionElems;
   	}
   
  +	/**
  +	 * Given a valid element key, return the corresponding node list.
  +	 *
  +	 * @param doc			   source document
  +	 * @param name			   name of the key, which must match the 'name'
  +	 *						   attribute on xsl:key
  +	 * @param ref			   value that must match the value found by the
  +	 *						   'match' attribute on xsl:key
  +	 * @param resolver		   resolver for namespace resolution
  +	 * @param nodelist         A node list to contain the nodes found
  +	 * @param executionContext current execution context
  +	 */
  +	void
  +	getNodeSetByKey(
  +			XalanNode*						doc,
  +			const XalanDOMString&			name,
  +			const XalanDOMString&			ref,
  +			const PrefixResolver&			resolver,
  +			MutableNodeRefList&				nodelist,
  +			StylesheetExecutionContext&		executionContext,
  +			KeyTablesTableType&				theKeysTable) const;
  +
   private:
   
   	/**
  
  
  
  1.5       +5 -41     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- VariablesStack.cpp	2000/08/10 18:43:12	1.4
  +++ VariablesStack.cpp	2000/09/19 15:12:17	1.5
  @@ -246,49 +246,13 @@
   
   
   
  -class PushFunctor
  +const void
  +VariablesStack::PushParamFunctor::operator()(const VariablesStack::ParamsVectorType::value_type&	theEntry)
   {
  -public:
  +	assert(theEntry.first != 0);
   
  -	PushFunctor(VariablesStack&		theVariablesStack) :
  -		m_variablesStack(theVariablesStack)
  -	{
  -	}
  -
  -	const void
  -	operator()(const VariablesStack::VariableStackStackType::value_type&	theEntry)
  -	{
  -		m_variablesStack.push(theEntry);
  -	}
  -
  -private:
  -
  -	VariablesStack&						m_variablesStack;
  -};
  -
  -
  -
  -class PushParamFunctor
  -{
  -public:
  -
  -	PushParamFunctor(VariablesStack&		theVariablesStack) :
  -		m_variablesStack(theVariablesStack)
  -	{
  -	}
  -
  -	const void
  -	operator()(const VariablesStack::ParamsVectorType::value_type&	theEntry)
  -	{
  -		assert(theEntry.first != 0);
  -
  -		m_variablesStack.push(VariablesStack::StackEntry(theEntry.first, theEntry.second));
  -	}
  -
  -private:
  -
  -	VariablesStack&						m_variablesStack;
  -};
  +	m_variablesStack.push(VariablesStack::StackEntry(theEntry.first, theEntry.second));
  +}
   
   
   
  
  
  
  1.4       +17 -0     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- VariablesStack.hpp	2000/08/10 18:43:12	1.3
  +++ VariablesStack.hpp	2000/09/19 15:12:18	1.4
  @@ -250,6 +250,23 @@
   
   	};
   
  +	class PushParamFunctor
  +	{
  +	public:
  +
  +		PushParamFunctor(VariablesStack&	theVariablesStack) :
  +			m_variablesStack(theVariablesStack)
  +		{
  +		}
  +
  +		const void
  +		operator()(const ParamsVectorType::value_type&	theEntry);
  +
  +	private:
  +
  +		VariablesStack&						m_variablesStack;
  +	};
  +
   private:
   
   	class StackEntry;
  
  
  
  1.63      +18 -9     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.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- XSLTEngineImpl.cpp	2000/09/05 02:24:53	1.62
  +++ XSLTEngineImpl.cpp	2000/09/19 15:12:19	1.63
  @@ -676,7 +676,9 @@
   
   		const XalanElement*		nsNode = 0;
   
  -		if (fragBase.getNodeType() == XalanNode::DOCUMENT_NODE)
  +		const XalanNode::NodeType	theType = fragBase.getNodeType();
  +
  +		if (theType == XalanNode::DOCUMENT_NODE)
   		{
   			const XalanDocument&	doc =
   #if defined(XALAN_OLD_STYLE_CASTS)
  @@ -687,7 +689,7 @@
   
   			nsNode = doc.getDocumentElement(); 
   		}
  -		else if	(fragBase.getNodeType() == XalanNode::ELEMENT_NODE)
  +		else if	(theType == XalanNode::ELEMENT_NODE)
   		{
   #if defined(XALAN_OLD_STYLE_CASTS)
   			nsNode = (const XalanElement*)&fragBase;
  @@ -954,20 +956,24 @@
   {
   	const XObject::eObjectType	type = value.getType();
   
  -	XalanDOMString s;
  -
   	switch(type)
   	{
   	case XObject::eTypeBoolean:
   	case XObject::eTypeNumber:
   	case XObject::eTypeString:
  -		s = value.str();
  -		characters(toCharArray(s), 0, length(s));
  +		{
  +			const XalanDOMString&	s = value.str();
  +
  +			characters(toCharArray(s), 0, length(s));
  +		}
   		break;				
   
   	case XObject::eTypeNodeSet:
   		{
  +			XalanDOMString			s;
  +
   			const NodeRefListBase&	nl = value.nodeset();
  +
   			const unsigned int		nChildren = nl.getLength();
   
   			for(unsigned int i = 0; i < nChildren; i++)
  @@ -1909,9 +1915,11 @@
   			bool				overrideStrip,
   			bool				shouldCloneAttributes)
   {
  -	bool	stripWhiteSpace = false;
  +	bool						stripWhiteSpace = false;
  +
  +	const XalanNode::NodeType	theType = node.getNodeType();
   
  -	switch(node.getNodeType())
  +	switch(theType)
   	{
   	case XalanNode::TEXT_NODE:
   		{
  @@ -2078,10 +2086,11 @@
   	// Can't really do this, but we won't throw an error so that copy-of will
   	// work
   	case XalanNode::DOCUMENT_NODE:
  +	case XalanNode::DOCUMENT_TYPE_NODE:
   	break;
   
   	default:
  -		error("Can not create item in result tree: " + node.getNodeName());
  +		error("Cannot create item in result tree: " + node.getNodeName());
   	break;
   
   	}
  
  
  
  1.14      +8 -7      xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.hpp
  
  Index: XSLTProcessorEnvSupportDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.hpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XSLTProcessorEnvSupportDefault.hpp	2000/08/14 22:08:09	1.13
  +++ XSLTProcessorEnvSupportDefault.hpp	2000/09/19 15:12:21	1.14
  @@ -231,6 +231,14 @@
   	virtual void
   	reset();
   
  +#if defined(XALAN_NO_NAMESPACES)
  +	typedef map<const XalanNode*,
  +				XLocator*,
  +				less<const XalanNode*> >			XLocatorTableType;
  +#else
  +	typedef std::map<const XalanNode*, XLocator*>	XLocatorTableType;
  +#endif
  +
   private:
   
   	// These are not implemented...
  @@ -242,13 +250,6 @@
   	bool
   	operator==(const XSLTProcessorEnvSupportDefault&) const;
   
  -#if defined(XALAN_NO_NAMESPACES)
  -	typedef map<const XalanNode*,
  -				XLocator*,
  -				less<const XalanNode*> >			XLocatorTableType;
  -#else
  -	typedef std::map<const XalanNode*, XLocator*>	XLocatorTableType;
  -#endif
   
   	// Data members...
   
  
  
  
  1.1                  xml-xalan/c/src/XSLT/XalanNumberingResourceBundle.cpp
  
  Index: XalanNumberingResourceBundle.cpp
  ===================================================================
  /*
   * 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/>.
   */
  
  #include "XalanNumberingResourceBundle.hpp"
  
  
  
  XalanNumberingResourceBundle::XalanNumberingResourceBundle(
  		const XalanDOMString&			theLanguage,
  		const XalanDOMString&			theUILanguage,
  		const XalanDOMString&			theHelpLanguage,
  		const XalanDOMCharVectorType&	theAlphabet,
  		const XalanDOMCharVectorType&	theTraditionalAlphabet,
  		eOrientation					theOrientation,
  		eNumberingMethod				theNumberingMethod,
  		eMultiplierOrder				theMultiplierOrder,
  		int								theMaxNumericalValue,
  		const IntVectorType&			theNumberGroups,
  		const IntVectorType&			theMultipliers,
  		const XalanDOMCharVectorType&	theZeroChar,
  		const XalanDOMCharVectorType&	theMultiplierChars,
  		const DigitsTableVectorType&	theDigitsTable,
  		const IntVectorType&			theDigitsTableTable) :
  	m_language(theHelpLanguage),
  	m_uiLanguage(theLanguage),
  	m_helpLanguage(theUILanguage),
  	m_alphabet(theAlphabet),
  	m_traditionalAlphabet(theTraditionalAlphabet),
  	m_orientation(theOrientation),
  	m_numberingMethod(theNumberingMethod),
  	m_multiplierOrder(theMultiplierOrder),
  	m_maxNumericalValue(theMaxNumericalValue),
  	m_numberGroups(theNumberGroups),
  	m_multipliers(theMultipliers),
  	m_zeroChar(theZeroChar),
  	m_multiplierChars(theMultiplierChars),
  	m_digitsTable(theDigitsTable),
  	m_digitsTableTable(theDigitsTableTable)
  {
  }
  
  
  
  XalanNumberingResourceBundle::XalanNumberingResourceBundle()
  {
  }
  
  
  
  XalanNumberingResourceBundle::XalanNumberingResourceBundle(const XalanNumberingResourceBundle&	theSource) :
  	m_language(theSource.m_language),
  	m_uiLanguage(theSource.m_uiLanguage),
  	m_helpLanguage(theSource.m_helpLanguage),
  	m_alphabet(theSource.m_alphabet),
  	m_traditionalAlphabet(theSource.m_traditionalAlphabet),
  	m_orientation(theSource.m_orientation),
  	m_numberingMethod(theSource.m_numberingMethod),
  	m_multiplierOrder(theSource.m_multiplierOrder),
  	m_maxNumericalValue(theSource.m_maxNumericalValue),
  	m_numberGroups(theSource.m_numberGroups),
  	m_multipliers(theSource.m_multipliers),
  	m_zeroChar(theSource.m_zeroChar),
  	m_multiplierChars(theSource.m_multiplierChars),
  	m_digitsTable(theSource.m_digitsTable),
  	m_digitsTableTable(theSource.m_digitsTableTable)
  {
  }
  
  
  
  XalanNumberingResourceBundle::~XalanNumberingResourceBundle()
  {
  }
  
  
  
  1.1                  xml-xalan/c/src/XSLT/XalanNumberingResourceBundle.hpp
  
  Index: XalanNumberingResourceBundle.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(XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD)
  #define XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD
  
  
  
  // Base include file.  Must be first.
  #include <XSLT/XSLTDefinitions.hpp>
  
  
  
  #include <vector>
  
  
  
  #include <PlatformSupport/DOMStringHelper.hpp>
  
  
  
  class XalanNumberingResourceBundle
  {
  public:
  
  #if defined(XALAN_NO_NAMESPACES)
  	typedef vector<int>								IntVectorType;
  	typedef vector<XalanDOMCharVectorType>			DigitsTableVectorType;
  #else
  	typedef std::vector<int>						IntVectorType;
  	typedef std::vector<XalanDOMCharVectorType>		DigitsTableVectorType;
  #endif
  
  	// Enum to describe language orientation.  (English is left-to-right,
  	// Hebrew is right-to-left, etc.)
  	enum eOrientation { eLeftToRight, eRightToLeft, eTopToBottom, eBottomToTop };
  
  	// Enum to describe how numbering is done.
  	enum eNumberingMethod { eAdditive, eMultiplicativeAdditive };
  
  	// Enum to describe the where the multiplier goes.
  	enum eMultiplierOrder { eFollows, ePrecedes };
  
  
  	XalanNumberingResourceBundle(
  		const XalanDOMString&			theLanguage,
  		const XalanDOMString&			theUILanguage,
  		const XalanDOMString&			theHelpLanguage,
  		const XalanDOMCharVectorType&	theAlphabet,
  		const XalanDOMCharVectorType&	theTraditionalAlphabet,
  		eOrientation					theOrientation,
  		eNumberingMethod				theNumberingMethod,
  		eMultiplierOrder				theMultiplierOrder,
  		int								theMaxNumericalValue,
  		const IntVectorType&			theNumberGroups,
  		const IntVectorType&			theMultipliers,
  		const XalanDOMCharVectorType&	theZeroChar,
  		const XalanDOMCharVectorType&	theMultiplierChars,
  		const DigitsTableVectorType&	theDigitsTable,
  		const IntVectorType&			theDigitsTableTable);
  
  	explicit
  	XalanNumberingResourceBundle();
  
  	XalanNumberingResourceBundle(const XalanNumberingResourceBundle&	theSource);
  
  	~XalanNumberingResourceBundle();
  
  	bool
  	operator==(const XalanNumberingResourceBundle&	theRHS) const
  	{
  		return equals(m_language, theRHS.m_language);
  	}
  
  	const XalanDOMString&
  	getLanguage() const
  	{
  		return m_language;
  	}
  
  	const XalanDOMString&
  	getUILanguage() const
  	{
  		return m_uiLanguage;
  	}
  
  	const XalanDOMString&
  	getHelpLanguage() const
  	{
  		return m_helpLanguage;
  	}
  
  	const XalanDOMCharVectorType&
  	getAlphabet() const
  	{
  		return m_alphabet;
  	}
  
  	const XalanDOMCharVectorType&
  	getTraditionalAlphabet() const
  	{
  		return m_traditionalAlphabet;
  	}
  
  	eOrientation
  	getOrientation() const
  	{
  		return m_orientation;
  	}
  
  	eNumberingMethod
  	getNumberingMethod() const
  	{
  		return m_numberingMethod;
  	}
  
  	eMultiplierOrder
  	getMultiplierOrder() const
  	{
  		return m_multiplierOrder;
  	}
  
  	int
  	getMaxNumericalValue() const
  	{
  		return m_maxNumericalValue;
  	}
  
  	const IntVectorType&
  	getNumberGroups() const
  	{
  		return m_numberGroups;
  	}
  
  	const IntVectorType&
  	getMultipliers() const
  	{
  		return m_multipliers;
  	}
  
  	const XalanDOMCharVectorType&
  	getZeroChar() const
  	{
  		return m_zeroChar;
  	}
  
  	const XalanDOMCharVectorType&
  	getMultiplierChars() const
  	{
  		return m_multiplierChars;
  	}
  
  	const DigitsTableVectorType&
  	getDigitsTable() const
  	{
  		return m_digitsTable;
  	}
  
  	const IntVectorType&
  	getDigitsTableTable() const
  	{
  		return m_digitsTableTable;
  	}
  
  private:
  
  	XalanDOMString			m_language;
  
  	XalanDOMString			m_uiLanguage;
  
  	XalanDOMString			m_helpLanguage;
  
  	XalanDOMCharVectorType	m_alphabet;
  
  	XalanDOMCharVectorType	m_traditionalAlphabet;
  
  	eOrientation			m_orientation;
  
  	eNumberingMethod		m_numberingMethod;
  
  	eMultiplierOrder		m_multiplierOrder;
  
  	int						m_maxNumericalValue;
  
  	IntVectorType			m_numberGroups;
  
  	IntVectorType			m_multipliers;
  
  	XalanDOMCharVectorType	m_zeroChar;
  
  	XalanDOMCharVectorType	m_multiplierChars;
  
  	DigitsTableVectorType	m_digitsTable;
  
  	IntVectorType			m_digitsTableTable;
  };
  
  
  
  #endif	// XALAN_NUMBERINGRESOURCEBUNDLE_HEADER_GUARD