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 2003/07/01 03:00:33 UTC

cvs commit: xml-xalan/c/src/xalanc/XMLSupport FormatterToDOM.cpp FormatterToDOM.hpp

dbertoni    2003/06/30 18:00:32

  Modified:    c/src/xalanc/XMLSupport FormatterToDOM.cpp
                        FormatterToDOM.hpp
  Log:
  Use new general-purpose code in DOMServices.
  
  Revision  Changes    Path
  1.2       +7 -30     xml-xalan/c/src/xalanc/XMLSupport/FormatterToDOM.cpp
  
  Index: FormatterToDOM.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToDOM.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FormatterToDOM.cpp	29 Jun 2003 03:57:59 -0000	1.1
  +++ FormatterToDOM.cpp	1 Jul 2003 01:00:32 -0000	1.2
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -84,6 +84,10 @@
   
   
   
  +#include <xalanc/DOMSupport/DOMServices.hpp>
  +
  +
  +
   XALAN_CPP_NAMESPACE_BEGIN
   
   
  @@ -323,7 +327,7 @@
   	{
   		// Check for the namespace...
   		const XalanDOMString* const		theNamespace =
  -					getNamespaceForPrefix(theElementName, *m_prefixResolver, m_buffer2);
  +					DOMServices::getNamespaceForPrefix(theElementName, *m_prefixResolver, false, m_buffer2);
   
   		if (theNamespace == 0 || length(*theNamespace) == 0)
   		{
  @@ -368,7 +372,7 @@
   
   			// Check for the namespace...
   			const XalanDOMString* const		theNamespace =
  -					getNamespaceForPrefix(theName, *m_prefixResolver, m_buffer2);
  +				DOMServices::getNamespaceForPrefix(theName, *m_prefixResolver, true, m_buffer2);
   
   			assign(m_buffer1, theName);
   			assign(m_buffer2, attrs.getValue(i));
  @@ -382,33 +386,6 @@
   				theElement->setAttributeNS(*theNamespace, m_buffer1, m_buffer2);
   			}
   		}
  -	}
  -}
  -
  -
  -
  -const XalanDOMString*
  -FormatterToDOM::getNamespaceForPrefix(
  -			const XalanDOMChar*		theName,
  -			const PrefixResolver&	thePrefixResolver,
  -			XalanDOMString&			thePrefix)
  -{
  -	const XalanDOMString::size_type		theLength = length(theName);
  -	const XalanDOMString::size_type		theColonIndex = indexOf(theName, XalanUnicode::charColon);
  -
  -	if (theColonIndex == theLength)
  -	{
  -		clear(thePrefix);
  -
  -		return thePrefixResolver.getNamespaceForPrefix(s_emptyString);
  -	}
  -	else
  -	{
  -		// Get the prefix from theName...
  -		assign(thePrefix, theName, theColonIndex);
  -		assert(length(thePrefix) != 0);
  -
  -		return thePrefixResolver.getNamespaceForPrefix(thePrefix);
   	}
   }
   
  
  
  
  1.2       +1 -7      xml-xalan/c/src/xalanc/XMLSupport/FormatterToDOM.hpp
  
  Index: FormatterToDOM.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToDOM.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FormatterToDOM.hpp	29 Jun 2003 03:57:59 -0000	1.1
  +++ FormatterToDOM.hpp	1 Jul 2003 01:00:32 -0000	1.2
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -243,12 +243,6 @@
   	addAttributes(
   			XalanElement*		theElement,
   			AttributeListType&	attrs);
  -
  -	const XalanDOMString*
  -	getNamespaceForPrefix(
  -			const XalanDOMChar*		theName,
  -			const PrefixResolver&	thePrefixResolver,
  -			XalanDOMString&			thePrefix);
   
   
   	// Data members...
  
  
  

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