You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/11/03 04:36:56 UTC

cvs commit: xml-xalan/c/src/XSLT KeyDeclaration.hpp KeyTable.cpp

dbertoni    2002/11/02 19:36:56

  Modified:    c/src/XSLT KeyDeclaration.hpp KeyTable.cpp
  Log:
  New implementation to keep pointer to XalanQName instance instead of making a copy.
  
  Revision  Changes    Path
  1.9       +4 -9      xml-xalan/c/src/XSLT/KeyDeclaration.hpp
  
  Index: KeyDeclaration.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/KeyDeclaration.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- KeyDeclaration.hpp	19 Dec 2001 22:06:51 -0000	1.8
  +++ KeyDeclaration.hpp	3 Nov 2002 03:36:56 -0000	1.9
  @@ -64,10 +64,6 @@
   
   
   
  -#include <XPath/XalanQNameByValue.hpp>
  -
  -
  -
   class XPath;
   
   
  @@ -90,7 +86,7 @@
   			const XalanQName&	qname,
   			const XPath&		matchPattern,
   			const XPath&		use) :
  -		m_qname(qname),
  +		m_qname(&qname),
   		m_match(&matchPattern),
   		m_use(&use)
   	{
  @@ -98,7 +94,7 @@
   
   	explicit
   	KeyDeclaration() :
  -		m_qname(),
  +		m_qname(0),
   		m_match(0),
   		m_use(0)
   	{
  @@ -120,7 +116,7 @@
   	 * 
   	 * @return name string
   	 */
  -	const XalanQName&
  +	const XalanQName*
   	getQName() const
   	{
   		return m_qname;
  @@ -150,12 +146,11 @@
   
   private:
   
  -	XalanQNameByValue	m_qname;
  +	const XalanQName*	m_qname;
   
   	const XPath*		m_match;
   
   	const XPath*		m_use;
  -
   };
   
   
  
  
  
  1.21      +6 -2      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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- KeyTable.cpp	26 Sep 2002 01:37:47 -0000	1.20
  +++ KeyTable.cpp	3 Nov 2002 03:36:56 -0000	1.21
  @@ -297,9 +297,11 @@
   
   	if(xuse->getType() != XObject::eTypeNodeSet)
   	{
  +		assert(kd.getQName() != 0);
  +
   		addIfNotFound(
   			executionContext,
  -			theKeys[kd.getQName()][xuse->str()],
  +			theKeys[*kd.getQName()][xuse->str()],
   			testNode);
   	}
   	else
  @@ -324,9 +326,11 @@
   
   			DOMServices::getNodeData(*nl.item(i), nodeData);
   
  +			assert(kd.getQName() != 0);
  +
   			addIfNotFound(
   				executionContext,
  -				theKeys[kd.getQName()][nodeData],
  +				theKeys[*kd.getQName()][nodeData],
   				testNode);
   
   			clear(nodeData);
  
  
  

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