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 FormatterToXML_UTF16.cpp FormatterToXML_UTF16.hpp FormatterToXML_UTF8.cpp FormatterToXML_UTF8.hpp FormatterToXMLBase.cpp
Date Tue, 10 Feb 2004 17:39:22 GMT
dbertoni    2004/02/10 09:39:22

  Modified:    c/src/xalanc/XMLSupport FormatterToXML_UTF16.cpp
                        FormatterToXML_UTF16.hpp FormatterToXML_UTF8.cpp
                        FormatterToXML_UTF8.hpp FormatterToXMLBase.cpp
  Log:
  Make sure carriage return is written as a numeric character reference in attribute values.
  
  Revision  Changes    Path
  1.8       +17 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FormatterToXML_UTF16.cpp	6 Jan 2004 02:41:31 -0000	1.7
  +++ FormatterToXML_UTF16.cpp	10 Feb 2004 17:39:22 -0000	1.8
  @@ -251,6 +251,10 @@
   	{
   		write(s_linefeedNCRString, s_linefeedNCRStringLength);
   	}
  +	else if (XalanUnicode::charCR == ch) 
  +	{
  +		write(s_carriageReturnNCRString, s_carriageReturnNCRStringLength);
  +	}
   	else if (XalanUnicode::charQuoteMark == ch) 
   	{
   		write(s_quoteEntityString, s_quoteEntityStringLength);
  @@ -1005,6 +1009,19 @@
   
   const XalanDOMString::size_type		FormatterToXML_UTF16::s_linefeedNCRStringLength =
   		FXML_SIZE(s_linefeedNCRString);
  +
  +const XalanDOMChar	FormatterToXML_UTF16::s_carriageReturnNCRString[] =
  +{
  +	XalanUnicode::charAmpersand,
  +	XalanUnicode::charNumberSign,
  +	XalanUnicode::charDigit_1,
  +	XalanUnicode::charDigit_3,
  +	XalanUnicode::charSemicolon,
  +	XalanDOMChar(0)
  +};
  +
  +const XalanDOMString::size_type		FormatterToXML_UTF16::s_carriageReturnNCRStringLength
=
  +		FXML_SIZE(s_carriageReturnNCRString);
   
   const XalanDOMChar	FormatterToXML_UTF16::s_htabNCRString[] =
   {
  
  
  
  1.8       +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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FormatterToXML_UTF16.hpp	6 Jan 2004 02:41:31 -0000	1.7
  +++ FormatterToXML_UTF16.hpp	10 Feb 2004 17:39:22 -0000	1.8
  @@ -435,6 +435,13 @@
   	static const XalanDOMString::size_type	s_linefeedNCRStringLength;
   
   	/**
  + 	 * The string "
".
  + 	 */
  + 	static const XalanDOMChar			    s_carriageReturnNCRString[];
  +
  +	static const XalanDOMString::size_type	s_carriageReturnNCRStringLength;
  +
  +	/**
    	 * The string "	".
    	 */
    	static const XalanDOMChar				s_htabNCRString[];
  
  
  
  1.10      +17 -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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FormatterToXML_UTF8.cpp	6 Feb 2004 08:57:08 -0000	1.9
  +++ FormatterToXML_UTF8.cpp	10 Feb 2004 17:39:22 -0000	1.10
  @@ -500,6 +500,10 @@
   	{
   		write(s_linefeedNCRString, s_linefeedNCRStringLength);
   	}
  +	else if (XalanUnicode::charCR == ch) 
  +	{
  +		write(s_carriageReturnNCRString, s_carriageReturnNCRStringLength);
  +	}
   	else if (XalanUnicode::charQuoteMark == ch) 
   	{
   		write(s_quoteEntityString, s_quoteEntityStringLength);
  @@ -1281,6 +1285,19 @@
   
   const XalanDOMString::size_type		FormatterToXML_UTF8::s_linefeedNCRStringLength =
   		FXML_SIZE(s_linefeedNCRString);
  +
  +const char	FormatterToXML_UTF8::s_carriageReturnNCRString[] =
  +{
  +	char(XalanUnicode::charAmpersand),
  +	char(XalanUnicode::charNumberSign),
  +	char(XalanUnicode::charDigit_1),
  +	char(XalanUnicode::charDigit_3),
  +	char(XalanUnicode::charSemicolon),
  +	char(0)
  +};
  +
  +const XalanDOMString::size_type		FormatterToXML_UTF8::s_carriageReturnNCRStringLength =
  +		FXML_SIZE(s_carriageReturnNCRString);
   
   const char	FormatterToXML_UTF8::s_htabNCRString[] =
   {
  
  
  
  1.8       +7 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FormatterToXML_UTF8.hpp	6 Jan 2004 02:41:31 -0000	1.7
  +++ FormatterToXML_UTF8.hpp	10 Feb 2004 17:39:22 -0000	1.8
  @@ -465,6 +465,13 @@
   	static const XalanDOMString::size_type	s_linefeedNCRStringLength;
   
   	/**
  + 	 * The string "
".
  + 	 */
  + 	static const char						s_carriageReturnNCRString[];
  +
  +	static const XalanDOMString::size_type	s_carriageReturnNCRStringLength;
  +
  +	/**
    	 * The string "	".
    	 */
    	static const char						s_htabNCRString[];
  
  
  
  1.8       +1 -1      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FormatterToXMLBase.cpp	6 Feb 2004 08:57:08 -0000	1.7
  +++ FormatterToXMLBase.cpp	10 Feb 2004 17:39:22 -0000	1.8
  @@ -91,7 +91,7 @@
   	kBothSpecial,		// 0xA -- linefeed  Normalize as requested, and write as a numeric character
reference in attribute values.
   	kNotSpecial,
   	kNotSpecial,
  -	kNotSpecial,
  +	kAttributeSpecial,	// 0xD -- carriage return.  Write as a numeric character reference
in attribute values.
   	kNotSpecial,
   	kNotSpecial,
   	kNotSpecial,		// 0x10
  
  
  

---------------------------------------------------------------------
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