You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2001/07/01 16:43:18 UTC

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

dbertoni    01/07/01 07:43:18

  Modified:    c/src/XSLT XSLTEngineImpl.cpp XSLTEngineImpl.hpp
  Log:
  Removed unused code.
  
  Revision  Changes    Path
  1.105     +1 -70     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.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- XSLTEngineImpl.cpp	2001/06/29 20:55:27	1.104
  +++ XSLTEngineImpl.cpp	2001/07/01 14:43:17	1.105
  @@ -175,8 +175,6 @@
   	XSLTProcessor(),
   	DocumentHandler(),
   	PrefixResolver(),
  -	m_outputCarriageReturns(false),
  -	m_outputLinefeeds(false),
   	m_useDOMResultTreeFactory(false),
   	m_domResultTreeFactory(0),
   	m_resultNameSpacePrefix(),
  @@ -684,7 +682,7 @@
   			}
   			else
   			{
  -				XSLTInputSource		inputSource(c_wstr(urlString));
  +				const XSLTInputSource	inputSource(c_wstr(urlString));
   
   				doc = parseXML(inputSource, docHandler, docToRegister);
   			}
  @@ -1013,15 +1011,6 @@
   
   
   
  -bool
  -XSLTEngineImpl::isXSLTagOfType(const XalanNode&	node,
  -							int 		tagType) const
  -{
  -	return getXSLToken(node) == tagType ? true : false;
  -}
  -
  -
  -
   void
   XSLTEngineImpl::outputToResultTree(
   			StylesheetExecutionContext&		executionContext,
  @@ -2414,49 +2403,6 @@
   	
   
   
  -// $$$ ToDo: This should not be here!!!!
  -bool
  -XSLTEngineImpl::qnameEqualsResultElemName(
  -			const QName&			qname,
  -			const XalanDOMString&	elementName) const
  -{
  -	const XalanDOMString*	elemNS = 0;
  -	XalanDOMString			elemLocalName;
  -
  -	const unsigned int	indexOfNSSep = indexOf(elementName, XalanUnicode::charColon);
  -
  -	if(indexOfNSSep < length(elementName))
  -	{
  -		const XalanDOMString	prefix = substring(elementName, 0, indexOfNSSep);
  -
  -		if(equals(prefix, DOMServices::s_XMLString))
  -		{
  -			elemNS = &DOMServices::s_XMLNamespaceURI;
  -		}
  -		else
  -		{
  -			elemNS = getResultNamespaceForPrefix(prefix);
  -		}
  -
  -		if(elemNS == 0)
  -		{
  -			error("Prefix must resolve to a namespace: " + prefix);
  -		}
  -
  -		elemLocalName =  substring(elementName, indexOfNSSep+1);
  -	}
  -	else
  -	{
  -		elemLocalName = elementName;
  -	}
  -
  -	assert(elemNS != 0);
  -
  -	return qname.equals(QNameByReference(*elemNS, elemLocalName));
  -}
  -
  -
  -
   const XalanDOMString*
   XSLTEngineImpl::getResultNamespaceForPrefix(const XalanDOMString&	prefix) const
   {
  @@ -3336,21 +3282,6 @@
   
   const XalanDOMString&	XSLTEngineImpl::s_uniqueNamespacePrefix = ::s_uniqueNamespacePrefix;
   
  -
  -/**
  - * Control if the xsl:variable is resolved early or 
  - * late. Resolving the xsl:variable
  - * early is a drag because it means that the fragment 
  - * must be created into a DocumentFragment, and then 
  - * cloned each time to the result tree.  If we can resolve 
  - * late, that means we can evaluate directly into the 
  - * result tree.  Right now this must be kept on 'early' 
  - * because you would need to set the call stack back to 
  - * the point of xsl:invoke... which I can't quite work out 
  - * at the moment.  I don't think this is worth fixing 
  - * until NodeList variables are implemented.
  - */
  -const bool										XSLTEngineImpl::s_resolveContentsEarly = true;
   
   const XSLTEngineImpl::AttributeKeysMapType&		XSLTEngineImpl::s_attributeKeys = ::s_attributeKeys;
   
  
  
  
  1.71      +8 -65     xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp
  
  Index: XSLTEngineImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- XSLTEngineImpl.hpp	2001/06/29 18:53:23	1.70
  +++ XSLTEngineImpl.hpp	2001/07/01 14:43:17	1.71
  @@ -735,18 +735,6 @@
   	getXSLToken(const XalanNode&	node) const;
   
   	/**
  -	 * Find the type of an element using this method.
  -	 *
  -	 * @param node	a probable xsl:xxx element
  -	 * @param tagType Constants.ELEMNAME_XXX token
  -	 * @return true if node is of tagType
  -	 */
  -	bool
  -	isXSLTagOfType(
  -			const XalanNode& node,
  -			int 		tagType) const;
  -
  -	/**
   	 * Whether to warn about pattern match conflicts.
   	 *
   	 * @return true to not warn about pattern match conflicts
  @@ -889,19 +877,7 @@
   	 */
   	bool
   	isCDataResultElem(const XalanDOMString&		elementName) const;
  -	
  -	/**
  -	 * Tell if a qualified name equals the current result tree name.
  -	 *
  -	 * @param qname 	  QName to compare to
  -	 * @param elementName current result tree element
  -	 * @return true if names are the same
  -	 */
  -	bool
  -	qnameEqualsResultElemName(
  -			const QName&			qname,
  -			const XalanDOMString&	elementName) const;
  -	
  +
   	/**
   	 * Retrieve the result namespace corresponding to a prefix.
   	 * 
  @@ -910,7 +886,7 @@
   	 */
   	const XalanDOMString*
   	getResultNamespaceForPrefix(const XalanDOMString&	prefix) const;
  -  
  +
   	/**
   	 * Retrieve the result prefix corresponding to a namespace.
   	 * 
  @@ -1254,7 +1230,7 @@
   	const Locator*
   	getLocatorFromStack() const
   	{
  -		return m_stylesheetLocatorStack.size() == 0 ? 0 : m_stylesheetLocatorStack.back();
  +		return m_stylesheetLocatorStack.empty() == true ? 0 : m_stylesheetLocatorStack.back();
   	}
   
   	/**
  @@ -1274,7 +1250,7 @@
   	void
   	popLocatorStack()
   	{
  -		if (m_stylesheetLocatorStack.size() != 0)
  +		if (m_stylesheetLocatorStack.empty() == false)
   		{
   			m_stylesheetLocatorStack.pop_back();
   		}
  @@ -1452,24 +1428,14 @@
   	}
   
   	/**
  -	 * If true, output carriage returns.
  -	 */
  -	bool	m_outputCarriageReturns;
  -
  -	/**
  -	 * If true, output linefeeds.
  -	 */
  -	bool	m_outputLinefeeds;
  -
  -	/**
   	 * If true, build DOM-based result tree fragments.
   	 */
  -	bool											m_useDOMResultTreeFactory;
  +	bool					m_useDOMResultTreeFactory;
   
   	/**
   	 * The factory that will be used to create DOM-based result tree fragments.
   	 */
  -	mutable XalanDocument*							m_domResultTreeFactory;
  +	mutable XalanDocument*	m_domResultTreeFactory;
   
   	/**
   	 * The namespace that the result tree conforms to.  A null value 
  @@ -1506,14 +1472,13 @@
   	XObjectFactory& 		m_xobjectFactory;
   
   	// The query/pattern-matcher object.
  -	XPathProcessorPtrType	m_xpathProcessor;
  +	const XPathProcessorPtrType		m_xpathProcessor;
   
   	/**
   	 * Stack of Booleans to keep track of if we should be outputting 
   	 * cdata instead of escaped text.
  -	 * ## Optimization: use array stack instead of object stack.
   	 */
  -	BoolVectorType			m_cdataStack;
  +	BoolVectorType	m_cdataStack;
   
   private:
   
  @@ -1629,28 +1594,6 @@
   	 */
   	unsigned long	m_uniqueNSValue;
     
  -
  -	/**
  -	 * Control if the xsl:variable is resolved early or 
  -	 * late. Resolving the xsl:variable
  -	 * early is a drag because it means that the fragment 
  -	 * must be created into a DocumentFragment, and then 
  -	 * cloned each time to the result tree.  If we can resolve 
  -	 * late, that means we can evaluate directly into the 
  -	 * result tree.  Right now this must be kept on 'early' 
  -	 * because you would need to set the call stack back to 
  -	 * the point of xsl:invoke... which I can't quite work out 
  -	 * at the moment.  I don't think this is worth fixing 
  -	 * until NodeList variables are implemented.
  -	 */
  -	static const bool	s_resolveContentsEarly;
  -
  -	bool
  -	getResolveContentsEarly() const
  -	{
  -		return s_resolveContentsEarly;
  -	}
  -
   	ParamVectorType 	m_topLevelParams;
   
   public:
  
  
  

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