You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jd...@locus.apache.org on 2000/03/07 21:22:39 UTC
cvs commit: xml-xalan/c/src/XMLSupport FormatterToHTML.cpp FormatterToHTML.hpp
jdonohue 00/03/07 12:22:39
Modified: c/src/XMLSupport FormatterToHTML.cpp FormatterToHTML.hpp
Log:
Fixed bug in processAttribute
Revision Changes Path
1.6 +8 -12 xml-xalan/c/src/XMLSupport/FormatterToHTML.cpp
Index: FormatterToHTML.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToHTML.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FormatterToHTML.cpp 2000/02/17 20:28:48 1.5
+++ FormatterToHTML.cpp 2000/03/07 20:22:37 1.6
@@ -55,7 +55,7 @@
* <http://www.apache.org/>.
*/
/**
- * $Id: FormatterToHTML.cpp,v 1.5 2000/02/17 20:28:48 dbertoni Exp $
+ * $Id: FormatterToHTML.cpp,v 1.6 2000/03/07 20:22:37 jdonohue Exp $
*
* $State: Exp $
*
@@ -526,10 +526,10 @@
else
pval = prepAttrString(value, m_attrSpecialChars, m_encoding);
- if(s_attrempties.find(toLowerCase(aname)) == s_attrempties.end())
+ if(s_attrempties.find(aname) == s_attrempties.end())
{
m_writer.write(' ');
- m_writer.write(aname);
+ m_writer.write(name);
m_writer.write("=\"");
m_writer.write(pval);
m_writer.write('\"');
@@ -539,11 +539,11 @@
m_writer.write(' ');
if((pval.length() == 0) || equalsIgnoreCase(pval, aname))
{
- m_writer.write(aname);
+ m_writer.write(name);
}
else
{
- m_writer.write(aname);
+ m_writer.write(name);
m_writer.write("=\"");
m_writer.write(pval);
m_writer.write('\"');
@@ -566,17 +566,14 @@
* @param specials Characters, should be represented in character references.
* @param encoding CURRENTLY NOT IMPLEMENTED.
* @return XML-formatted string.
- * @see #backReference
- * NOTE: return value destroyed on subsequent calls
*/
-const DOMString& FormatterToHTML::prepAttrURI(
+const DOMString FormatterToHTML::prepAttrURI(
const DOMString& string,
const DOMString& /* specials */,
const DOMString& /* encoding */)
// java: throws SAXException
{
- static DOMString sb;
- sb = "";
+ DOMString sb;
const unsigned int theLength = length(string);
for (unsigned int i = 0; i < theLength; i ++)
@@ -588,7 +585,7 @@
(ch < 0x7F)) && // X'7F' not valid
(s_escapetb.find(sch)== s_escapetb.end()) ) // characters in the table
{
- sb += ch; // valid character, append it
+ sb += sch; // valid character, append it
}
else
{
@@ -609,7 +606,6 @@
sb += LongToHexDOMString(b2);
}
}
-
return sb;
}
1.3 +2 -2 xml-xalan/c/src/XMLSupport/FormatterToHTML.hpp
Index: FormatterToHTML.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToHTML.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FormatterToHTML.hpp 2000/03/06 17:05:20 1.2
+++ FormatterToHTML.hpp 2000/03/07 20:22:38 1.3
@@ -58,7 +58,7 @@
#define FORMATTERTOHTML_HEADER_GUARD_1357924680
/**
- * $Id: FormatterToHTML.hpp,v 1.2 2000/03/06 17:05:20 jdonohue Exp $
+ * $Id: FormatterToHTML.hpp,v 1.3 2000/03/07 20:22:38 jdonohue Exp $
*
* $State: Exp $
*
@@ -248,7 +248,7 @@
* @see #backReference
* NOTE: return value destroyed on subsequent calls
*/
- const DOMString& prepAttrURI(
+ const DOMString prepAttrURI(
const DOMString& string,
const DOMString& specials,
const DOMString& encoding);