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/09/19 01:55:23 UTC

cvs commit: xml-xalan/c/src/xalanc/XMLSupport FormatterToHTML.cpp FormatterToXML.cpp FormatterToXML_UTF16.cpp FormatterToXML_UTF16.hpp FormatterToXML_UTF8.cpp FormatterToXML_UTF8.hpp FormatterToXMLBase.cpp

dbertoni    2003/09/18 16:55:23

  Modified:    c/src/xalanc/XMLSupport FormatterToHTML.cpp
                        FormatterToXML.cpp FormatterToXML_UTF16.cpp
                        FormatterToXML_UTF16.hpp FormatterToXML_UTF8.cpp
                        FormatterToXML_UTF8.hpp FormatterToXMLBase.cpp
  Log:
  Fix for bugzilla 23183.
  
  Revision  Changes    Path
  1.2       +1 -0      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FormatterToHTML.cpp	29 Jun 2003 03:57:59 -0000	1.1
  +++ FormatterToHTML.cpp	18 Sep 2003 23:55:23 -0000	1.2
  @@ -153,6 +153,7 @@
   	m_attrCharsMap[XalanUnicode::charLF] = 'S';
   
   	// These should _not_ be escaped...
  +	m_attrCharsMap[XalanUnicode::charHTab] = 0;
   	m_attrCharsMap[XalanUnicode::charLessThanSign] = 0;
   	m_attrCharsMap[XalanUnicode::charGreaterThanSign] = 0;
   
  
  
  
  1.3       +3 -2      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FormatterToXML.cpp	1 Jul 2003 23:46:56 -0000	1.2
  +++ FormatterToXML.cpp	18 Sep 2003 23:55:23 -0000	1.3
  @@ -356,8 +356,9 @@
   		}
   	}
   
  -	m_attrCharsMap[0x0A] = 'S';
  -	m_attrCharsMap[0x0D] = 'S';
  +	m_attrCharsMap[XalanUnicode::charHTab] = 'S';
  +	m_attrCharsMap[XalanUnicode::charLF] = 'S';
  +	m_attrCharsMap[XalanUnicode::charCR] = 'S';
   }
   
   
  
  
  
  1.5       +15 -0     xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp
  
  Index: FormatterToXML_UTF16.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FormatterToXML_UTF16.cpp	31 Jul 2003 22:55:59 -0000	1.4
  +++ FormatterToXML_UTF16.cpp	18 Sep 2003 23:55:23 -0000	1.5
  @@ -255,6 +255,10 @@
   	{
   		write(s_quoteEntityString, s_quoteEntityStringLength);
   	}
  +	else if (XalanUnicode::charHTab == ch) 
  +	{
  +		write(s_htabNCRString, s_htabNCRStringLength);
  +	}
   	else
   	{
   		return false;
  @@ -1002,6 +1006,17 @@
   const XalanDOMString::size_type		FormatterToXML_UTF16::s_linefeedNCRStringLength =
   		FXML_SIZE(s_linefeedNCRString);
   
  +const XalanDOMChar	FormatterToXML_UTF16::s_htabNCRString[] =
  +{
  +	XalanUnicode::charAmpersand,
  +	XalanUnicode::charNumberSign,
  +	XalanUnicode::charDigit_9,
  +	XalanUnicode::charSemicolon,
  +	XalanDOMChar(0)
  +};
  +
  +const XalanDOMString::size_type		FormatterToXML_UTF16::s_htabNCRStringLength =
  +		FXML_SIZE(s_htabNCRString);
   
   
   XALAN_CPP_NAMESPACE_END
  
  
  
  1.6       +7 -0      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.hpp
  
  Index: FormatterToXML_UTF16.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FormatterToXML_UTF16.hpp	31 Jul 2003 22:55:59 -0000	1.5
  +++ FormatterToXML_UTF16.hpp	18 Sep 2003 23:55:23 -0000	1.6
  @@ -434,6 +434,13 @@
   
   	static const XalanDOMString::size_type	s_linefeedNCRStringLength;
   
  +	/**
  + 	 * The string "	".
  + 	 */
  + 	static const XalanDOMChar				s_htabNCRString[];
  +
  +	static const XalanDOMString::size_type	s_htabNCRStringLength;
  +
   	enum
   	{
   		kBufferSize = 512		// The size of the buffer
  
  
  
  1.5       +16 -0     xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.cpp
  
  Index: FormatterToXML_UTF8.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FormatterToXML_UTF8.cpp	31 Jul 2003 22:55:59 -0000	1.4
  +++ FormatterToXML_UTF8.cpp	18 Sep 2003 23:55:23 -0000	1.5
  @@ -500,6 +500,10 @@
   	{
   		write(s_quoteEntityString, s_quoteEntityStringLength);
   	}
  +	else if (XalanUnicode::charHTab == ch) 
  +	{
  +		write(s_htabNCRString, s_htabNCRStringLength);
  +	}
   	else
   	{
   		return false;
  @@ -1273,6 +1277,18 @@
   
   const XalanDOMString::size_type		FormatterToXML_UTF8::s_linefeedNCRStringLength =
   		FXML_SIZE(s_linefeedNCRString);
  +
  +const char	FormatterToXML_UTF8::s_htabNCRString[] =
  +{
  +	char(XalanUnicode::charAmpersand),
  +	char(XalanUnicode::charNumberSign),
  +	char(XalanUnicode::charDigit_9),
  +	char(XalanUnicode::charSemicolon),
  +	char(0)
  +};
  +
  +const XalanDOMString::size_type		FormatterToXML_UTF8::s_htabNCRStringLength =
  +		FXML_SIZE(s_htabNCRString);
   
   
   
  
  
  
  1.6       +8 -0      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.hpp
  
  Index: FormatterToXML_UTF8.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FormatterToXML_UTF8.hpp	31 Jul 2003 22:55:59 -0000	1.5
  +++ FormatterToXML_UTF8.hpp	18 Sep 2003 23:55:23 -0000	1.6
  @@ -464,6 +464,14 @@
   
   	static const XalanDOMString::size_type	s_linefeedNCRStringLength;
   
  +	/**
  + 	 * The string "	".
  + 	 */
  + 	static const char						s_htabNCRString[];
  +
  +	static const XalanDOMString::size_type	s_htabNCRStringLength;
  +
  +
   	typedef void (FormatterToXML_UTF8::*NameFunctionType)(const XalanDOMChar*);
   
   	NameFunctionType	m_nameFunction;
  
  
  
  1.3       +2 -2      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXMLBase.cpp
  
  Index: FormatterToXMLBase.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXMLBase.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FormatterToXMLBase.cpp	21 Aug 2003 00:33:52 -0000	1.2
  +++ FormatterToXMLBase.cpp	18 Sep 2003 23:55:23 -0000	1.3
  @@ -86,8 +86,8 @@
   	kNotSpecial,
   	kNotSpecial,
   	kNotSpecial,
  -	kNotSpecial,
  -	kBothSpecial,		// 0xA -- linefeed  Special because we normalize as requested.
  +	kAttributeSpecial,	// 0x9 -- horizontal tab.  Write as a numeric character reference in attribute values.
  +	kBothSpecial,		// 0xA -- linefeed  Normalize as requested, and write as a numeric character reference in attribute values.
   	kNotSpecial,
   	kNotSpecial,
   	kNotSpecial,
  
  
  

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