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/01/30 23:02:23 UTC

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

dbertoni    01/01/30 14:02:23

  Modified:    c/src/XSLT NamespacesHandler.cpp NamespacesHandler.hpp
  Log:
  Added ability to ingore namespace aliases and removed bogus asserts.
  
  Revision  Changes    Path
  1.6       +7 -6      xml-xalan/c/src/XSLT/NamespacesHandler.cpp
  
  Index: NamespacesHandler.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/NamespacesHandler.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NamespacesHandler.cpp	2000/12/05 22:31:47	1.5
  +++ NamespacesHandler.cpp	2001/01/30 22:02:22	1.6
  @@ -82,7 +82,8 @@
   	m_excludedResultPrefixes(),
   	m_namespaceDeclarations(),
   	m_extensionNamespaceURIs(),
  -	m_namespaceAliases()
  +	m_namespaceAliases(),
  +	m_processAliases(true)
   {
   }
   
  @@ -95,7 +96,8 @@
   	m_excludedResultPrefixes(),
   	m_namespaceDeclarations(),
   	m_extensionNamespaceURIs(),
  -	m_namespaceAliases()
  +	m_namespaceAliases(),
  +	m_processAliases(true)
   {
   	// Go through the namespaces stack in reverse order...
   	const NamespacesStackType::const_reverse_iterator	theEnd =
  @@ -118,7 +120,6 @@
   			const NameSpace&		theNamespace = *j;
   
   			const XalanDOMString&	theURI = theNamespace.getURI();
  -			assert(length(theURI) > 0);
   
   			const XalanDOMString&	thePrefix = theNamespace.getPrefix();
   
  @@ -147,7 +148,8 @@
   	m_excludedResultPrefixes(theSource.m_excludedResultPrefixes),
   	m_namespaceDeclarations(theSource.m_namespaceDeclarations),
   	m_extensionNamespaceURIs(theSource.m_extensionNamespaceURIs),
  -	m_namespaceAliases(theSource.m_namespaceAliases)
  +	m_namespaceAliases(theSource.m_namespaceAliases),
  +	m_processAliases(theSource.m_processAliases)
   {
   }
   
  @@ -392,7 +394,6 @@
   			const NameSpaceExtended&	theNamespace = (*i).second;
   
   			const XalanDOMString&		theResultURI = theNamespace.getURI();
  -			assert(length(theResultURI) > 0);
   			assert(length(theNamespace.getResultAttributeName()) > 0);
   
   			const XalanDOMString&		thePrefix = theNamespace.getPrefix();
  @@ -566,7 +567,7 @@
   void
   NamespacesHandler::processNamespaceAliases()
   {
  -	if (m_namespaceDeclarations.size() > 0)
  +	if (m_processAliases == true && m_namespaceDeclarations.size() > 0)
   	{
   		const NamespacesMapType::iterator	theEnd =
   				m_namespaceDeclarations.end();
  
  
  
  1.5       +15 -0     xml-xalan/c/src/XSLT/NamespacesHandler.hpp
  
  Index: NamespacesHandler.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/NamespacesHandler.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NamespacesHandler.hpp	2000/11/02 01:46:27	1.4
  +++ NamespacesHandler.hpp	2001/01/30 22:02:22	1.5
  @@ -352,6 +352,18 @@
   	void
   	swap(NamespacesHandler&		theOther);
   
  +	bool
  +	getProcessNamespaceAliaises() const
  +	{
  +		return m_processAliases;
  +	}
  +
  +	void
  +	setProcessNamespaceAliaises(bool	fValue)
  +	{
  +		m_processAliases = fValue;
  +	}
  +
   private:
   
   	/**
  @@ -425,6 +437,9 @@
   	ExtensionNamespaceURISetType	m_extensionNamespaceURIs;
   
   	NamespaceAliasesMapType			m_namespaceAliases;
  +
  +	// If true namespace aliases will be processed.  If false, they will not.
  +	bool							m_processAliases;
   
   	const static XalanDOMString		s_dummyEmptyString;
   };