xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbert...@apache.org
Subject cvs commit: xml-xalan/c/src/xalanc/XMLSupport FormatterToHTML.cpp FormatterToXML.cpp FormatterToXMLUnicode.hpp
Date Thu, 30 Jun 2005 21:52:36 GMT
dbertoni    2005/06/30 14:52:36

  Modified:    c/src/xalanc/XMLSupport FormatterToHTML.cpp
                        FormatterToXML.cpp FormatterToXMLUnicode.hpp
  Log:
  Fixes for XALANC-530.
  
  Revision  Changes    Path
  1.11      +18 -26    xml-xalan/c/src/xalanc/XMLSupport/FormatterToHTML.cpp
  
  Index: FormatterToHTML.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToHTML.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FormatterToHTML.cpp	23 May 2005 20:53:01 -0000	1.10
  +++ FormatterToHTML.cpp	30 Jun 2005 21:52:35 -0000	1.11
  @@ -885,41 +885,33 @@
   			const XalanDOMChar*										value,
   			const XalanHTMLElementsProperties::ElementProperties&	elemProperties)
   {
  -	// We add a fake attribute to the source tree to
  -	// declare the xml prefix, so we filter it back out
  -	// here...
  -	// $$$ ToDo: It would be better if we didn't have to do
  -	// this here.
   	const XalanDOMString::size_type		nameLength = length(name);
   
  -	if (equals(name, nameLength, c_wstr(DOMServices::s_XMLNamespacePrefix), DOMServices::s_XMLNamespacePrefixLength)
== false)
  -	{
  -		accumContent(XalanUnicode::charSpace);
  +	accumContent(XalanUnicode::charSpace);
   
  -		const XalanDOMString::size_type		valueLength = length(value);
  +	const XalanDOMString::size_type		valueLength = length(value);
   
  -		if((valueLength == 0 || equalsIgnoreCaseASCII(name, nameLength, value, valueLength))
&&
  -		   elemProperties.isAttribute(name, XalanHTMLElementsProperties::ATTREMPTY) == true)
  +	if((valueLength == 0 || equalsIgnoreCaseASCII(name, nameLength, value, valueLength)) &&
  +	   elemProperties.isAttribute(name, XalanHTMLElementsProperties::ATTREMPTY) == true)
  +	{
  +		accumName(name);
  +	}
  +	else
  +	{
  +		accumName(name, 0, nameLength);
  +		accumContent(XalanUnicode::charEqualsSign);
  +		accumContent(XalanUnicode::charQuoteMark);
  +
  +		if(elemProperties.isAttribute(name, XalanHTMLElementsProperties::ATTRURL) == true)
   		{
  -			accumName(name);
  +			writeAttrURI(value, valueLength);
   		}
   		else
   		{
  -			accumName(name, 0, nameLength);
  -			accumContent(XalanUnicode::charEqualsSign);
  -			accumContent(XalanUnicode::charQuoteMark);
  -
  -			if(elemProperties.isAttribute(name, XalanHTMLElementsProperties::ATTRURL) == true)
  -			{
  -				writeAttrURI(value, valueLength);
  -			}
  -			else
  -			{
  -				writeAttrString(value, valueLength);
  -			}
  -
  -			accumContent(XalanUnicode::charQuoteMark);
  +			writeAttrString(value, valueLength);
   		}
  +
  +		accumContent(XalanUnicode::charQuoteMark);
   	}
   }
   
  
  
  
  1.19      +6 -14     xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML.cpp
  
  Index: FormatterToXML.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FormatterToXML.cpp	26 May 2005 18:21:54 -0000	1.18
  +++ FormatterToXML.cpp	30 Jun 2005 21:52:35 -0000	1.19
  @@ -1790,20 +1790,12 @@
               const XalanDOMChar*     name,
               const XalanDOMChar*     value)
   {
  -    // We add a fake attribute to the source tree to
  -    // declare the xml prefix, so we filter it back out
  -    // here...
  -    // $$$ ToDo: It would be better if we didn't have to do
  -    // this here.
  -    if (equals(name, DOMServices::s_XMLNamespacePrefix) == false)
  -    {
  -        accumContent(XalanUnicode::charSpace);
  -        accumName(name);
  -        accumContent(XalanUnicode::charEqualsSign);
  -        accumContent(XalanUnicode::charQuoteMark);
  -        writeAttrString(value, length(value));
  -        accumContent(XalanUnicode::charQuoteMark);
  -    }
  +    accumContent(XalanUnicode::charSpace);
  +    accumName(name);
  +    accumContent(XalanUnicode::charEqualsSign);
  +    accumContent(XalanUnicode::charQuoteMark);
  +    writeAttrString(value, length(value));
  +    accumContent(XalanUnicode::charQuoteMark);
   }
   
   
  
  
  
  1.6       +6 -14     xml-xalan/c/src/xalanc/XMLSupport/FormatterToXMLUnicode.hpp
  
  Index: FormatterToXMLUnicode.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXMLUnicode.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FormatterToXMLUnicode.hpp	6 Jun 2005 01:32:45 -0000	1.5
  +++ FormatterToXMLUnicode.hpp	30 Jun 2005 21:52:35 -0000	1.6
  @@ -825,20 +825,12 @@
           const XalanDOMChar*     name,
           const XalanDOMChar*     value)
       {
  -        // We add a fake attribute to the source tree to
  -        // declare the xml prefix, so we filter it back out
  -        // here...
  -        // $$$ ToDo: It would be better if we didn't have to do
  -        // this here.
  -        if (equals(name, DOMServices::s_XMLNamespacePrefix) == false)
  -        {
  -            m_writer.write(value_type(XalanUnicode::charSpace));
  -            writeName(name);
  -            m_writer.write(value_type(XalanUnicode::charEqualsSign));
  -            m_writer.write(value_type(XalanUnicode::charQuoteMark));
  -            writeAttrString(value, length(value));
  -            m_writer.write(value_type(XalanUnicode::charQuoteMark));
  -        }
  +        m_writer.write(value_type(XalanUnicode::charSpace));
  +        writeName(name);
  +        m_writer.write(value_type(XalanUnicode::charEqualsSign));
  +        m_writer.write(value_type(XalanUnicode::charQuoteMark));
  +        writeAttrString(value, length(value));
  +        m_writer.write(value_type(XalanUnicode::charQuoteMark));
       }
   
       /**
  
  
  

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


Mime
View raw message