Commit Graph
35 Commits
Author SHA1 Message Date
Martin Baulig 7d170f400d Sync parameter names with .NET. 2012-06-03 04:02:28 +02:00
Miguel de Icaza ae0feab435 Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported 2012-06-01 18:04:24 -04:00
Marek Safar 7b3f562eab A fix for failing xml writer tests 2012-05-31 11:25:24 +01:00
Richard Kettlewell b79b1ceaf5 Fix XmlTextWriter's use of NewLineHandling.
- Move the setting of newline_handling early enough that Initialize()
  can see it.
- Reduce the set of characters that trigger the slow path for
  attribute values for the NewLineHandling.None case.
- Rewrite the handling of \t, \r and \n to match the MS docs
  (which match the observed behavior of their implementation)
- Add some tests.
2012-05-03 10:49:54 +01:00
Atsushi Eno 2927d27304 bugfix #3231 - when XmlWriterSettings specifies Indent, some WriteWhitespace() is ignored. 2012-03-08 22:42:10 +09:00
Atsushi Eno 383d6b9338 2010-03-17 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : fix cosmetic 2.0 compatibility issue in 
	  WriteStartAttribute() which allows "" for prefixed xmlns and brings
	  incompatibility with XmlTextWriter class.


svn path=/trunk/mcs/; revision=153709
2010-03-17 05:10:42 +00:00
Atsushi Eno e703e2593c 2010-01-12 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : handle a corner case for empty string handling 
	  difference between XmlTextWriter and XmlWriter.Create().

	* XmlWriterTests.cs : added a corner case test for empty string handling
	  difference between XmlTextWriter and XmlWriter.Create().


svn path=/trunk/mcs/; revision=149368
2010-01-12 03:07:59 +00:00
Atsushi Eno 9a708bffad 2009-11-27 Atsushi Enomoto <[email protected]>
* NamespaceHandling.cs, XmlWriterSettings.cs, XmlTextWriter2.cs:
	  implement NamespaceHandling support for Moonlight.

	* System.Xml.dll.sources : added NamespaceHandling which is kept
	  internal in 2.0 (to simplify its support in XmlTextWriter).


svn path=/trunk/mcs/; revision=147022
2009-11-27 03:14:15 +00:00
Atsushi Eno 65f82e7013 2009-03-17 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : some weird TextWriter has null Encoding.
	  Fixed bug #372525.


svn path=/trunk/mcs/; revision=129534
2009-03-17 07:56:21 +00:00
Atsushi Eno c7a471732a 2009-03-16 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : only bogus v1 XmlTextWriter ignores null
	  namespace for conflict check. Fixed bug #479725.

	* XmlWriterTests.cs : only bogus XmlTextWriter ignores null namespace
	  for namespae conflict check.


svn path=/trunk/mcs/; revision=129398
2009-03-16 06:48:19 +00:00
Atsushi Eno c225d87477 2009-02-10 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : similar fix in WriteStartElement() to
	  previous change. Fixed bug #474091.

	* XmlTextWriterTests.cs : added test for bug #474091.


svn path=/trunk/mcs/; revision=126417
2009-02-10 04:09:27 +00:00
Atsushi Eno fbda9fbe5d 2009-02-06 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : in WriteStartAttribute(), fill namespace in
	  case it is null and the prefix has matching ns. Fixed bug #472634.

	* XmlTextWriterTests.cs : added test for bug #472634.


svn path=/trunk/mcs/; revision=126047
2009-02-06 14:13:28 +00:00
Marek Safar 95a6e77b85 Warnings cleanup
svn path=/trunk/mcs/; revision=111839
2008-08-28 16:53:31 +00:00
Atsushi Eno c8e0f4c0ca 2007-10-10 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : making <del>silly</del>funky MS compatibility
	  change in WriteStartAttribute() to call WriteEndAttribute() if an
	  attribute is open.


svn path=/trunk/mcs/; revision=87281
2007-10-10 17:22:43 +00:00
Atsushi Eno cfbd08e86f 2007-10-10 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : I could make previous change only in 2.0 mode.


svn path=/trunk/mcs/; revision=87261
2007-10-10 11:42:52 +00:00
Atsushi Eno f209b0ba7b 2007-10-10 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : When it is at Error state, do not try to close
	  attributes and elements at Close(). They will result in further
	  error and rather hide the actual issue when disposed.


svn path=/trunk/mcs/; revision=87254
2007-10-10 11:11:10 +00:00
Atsushi Eno 28bfedcf61 2007-09-27 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : implemented WriteValue(object) based on
	  MSDN "Writing Typed Data" with some fix.
	  http://msdn2.microsoft.com/en-us/library/bft97s8e(VS.80).aspx
	* XmlTextWriter.cs : state check is extraneous. It caused unexpected
	  rejection of empty namespace URI.

	* XmlWriterTests.cs : added test for WriteValue(object).
	* XmlTextWriterTests.cs : added WriteQualifiedName() test with empty
	  namespace.


svn path=/trunk/mcs/; revision=86483
2007-09-27 11:39:15 +00:00
Atsushi Eno 08087f828c 2007-08-13 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : fix extraneous indentation which is put after
	  omitted xmldecl.

	* XmlWriterSettingsTests.cs : added test for extraneous newline on
	  OmitXmlDeclaration mode.


svn path=/trunk/mcs/; revision=83958
2007-08-13 13:51:34 +00:00
Atsushi Eno a90b8aa7ce 2007-05-31 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs :
	  NewLineOnAttributes indentation fix, for bug #81770.

	* XmlWriterSettingsTests.cs : added test for NewLineOnAttributes.


svn path=/trunk/mcs/; revision=78290
2007-05-31 02:23:03 +00:00
Konstantin Triger 286c3bfeb8 ensure the file is closed in XmlWriter.Create(filename)
svn path=/trunk/mcs/; revision=77450
2007-05-16 06:04:45 +00:00
Atsushi Eno 983e7a1263 2006-11-20 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : fixed some relationship between
	  ConformanceLevel, OmitXmlDeclaration and WriteStartDocument().
	  See new tests more details.
	* XmlWriter.cs : it could reuse XmlTextWriter.ctor(TextWriter,
	  XmlWriterSettings). It also resulted in dropping several internal
	  members in XmlTextWriter.

	* XmlWriterSettingsTests.cs : added tests for relationship between
	  ConformanceLevel, OmitXmlDeclaration and WriteStartDocument().


svn path=/trunk/mcs/; revision=68180
2006-11-20 09:39:58 +00:00
Atsushi Eno 2d523b995c 2006-09-27 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : null arg check.


svn path=/trunk/mcs/; revision=65998
2006-09-27 20:58:34 +00:00
Atsushi Eno d543ed0b78 2006-09-01 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : expect atomized names only when it is
	  appropriate. Fixed bug #79047.

	* XmlTextWriterTests.cs : added test for bug #79047


svn path=/trunk/mcs/; revision=64676
2006-09-01 05:21:48 +00:00
Atsushi Eno fc826ee0c8 2006-08-10 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : more indentation fixes. Now I believe it is
	  almost MS compat, but it won't help poor Mike.

	* XmlTextWriterTests.cs : more indentation tests.


svn path=/trunk/mcs/; revision=63574
2006-08-10 05:56:02 +00:00
Atsushi Eno e8adca21e7 2006-08-07 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : WriteBinHex() is allowed at Attribute state.
	  Fixed bug #79019.

	* XmlTextWriterTests.cs : test for #79019.


svn path=/trunk/mcs/; revision=63422
2006-08-07 03:36:21 +00:00
Atsushi Eno 93c714b33f 2006-07-28 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : fixed some indentation bugs: comments and PIs
	  should not cause indentation override like text, cdata and
	  whitespaces do.
	  Fixed some error messages on node kind.
	* XmlTextWriter.cs, XmlTextWriterOpenElement.cs : removed old code.
	  (I don't want to remove old great code but it confused mike today.)

	* XmlTextWriterTests.cs : added test case for comments, PIs and
	  indentation.


svn path=/trunk/mcs/; revision=63079
2006-07-28 15:45:18 +00:00
Atsushi Eno 234edcaeed 2006-06-08 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : if an attribute being written has the same
	  non-empty namespace URI as current default namespace, its prefix
	  should be written. Fixed bug #78598.

	* XmlTextWriterTests.cs : added test for bug #78598.


svn path=/trunk/mcs/; revision=61550
2006-06-08 02:39:12 +00:00
Atsushi Eno a301e7e1da 2006-04-21 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : fix for bug #78148. set_Formatting() is not
	  rejected after writing some content. I totally disagree on that
	  it should be allowed, but here is the fix.

	* XmlTextWriterTests.cs : test for bug #78148.


svn path=/trunk/mcs/; revision=59722
2006-04-21 02:29:45 +00:00
Atsushi Eno 9275dc19bf 2006-02-24 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs :
	  WriteRaw() has stupid second arg. Fixed bug #77623.
	  WriteString() should raise an error when it is called immediately
	  after WriteStartDocument().

	* XmlTextWriterTests.cs : added test for bug #77623. Also fixed
	  WriteString() test which failed to fail (Assert.Fail).


svn path=/trunk/mcs/; revision=57229
2006-02-24 06:58:11 +00:00
Atsushi Eno 64477a4650 2006-02-22 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : WriteChars() should allow Attribute state.


svn path=/trunk/mcs/; revision=57146
2006-02-22 07:46:09 +00:00
Atsushi Eno 578b26de8c 2006-02-22 Atsushi Enomoto <[email protected]>
* XmlChar.cs : (IndexOfInvalidChar) fixed surrogate pairs handling.
	  They were always regarded as invalid.
	* XmlTextWriter2.cs : seems like MS XmlTextWriter outputs invalid
	  characters as character references. It totally does not make sense
	  but corcompare depended on that behavior.

	  This "compatibility" fix causes 10% or more performance loss!!!

	* XmlTextWriterTests.cs : added invalid character processing test.


svn path=/trunk/mcs/; revision=57145
2006-02-22 07:05:20 +00:00
Atsushi Eno 4cd416ff69 2006-02-21 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : (WriteStartAtribute) more == removal.
	* XmlNode.cs : (get_InnerText) reduce extra StringBuilder creation.


svn path=/trunk/mcs/; revision=57108
2006-02-21 20:59:25 +00:00
Atsushi Eno 52772977c0 2006-02-21 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : (WriteStartAttribute) reduced string == string.


svn path=/trunk/mcs/; revision=57103
2006-02-21 19:36:46 +00:00
Atsushi Eno daac641760 2006-02-21 Atsushi Enomoto <[email protected]>
* XmlTextWriter2.cs : (CloseStartElement)
	  Avoid ArrayList.Clear() and culture-sensitive Contains().


svn path=/trunk/mcs/; revision=57096
2006-02-21 17:02:29 +00:00
Atsushi Eno 9eb523dd9f 2006-02-21 Atsushi Enomoto <[email protected]>
* XmlNamespaceManager.cs : added internal LookupPrefixExclusive()
	  which discards "overriden" namespaces.
	* XmlTextWriter2.cs : fresh implementation.
	  - The source structure is simplified and cleaner.
	  - When outputting escaped string, output directly to TextWriter.
	  - roughly 20% performance improvement.

	  (Also fixed previous perf. evaluation excess in ChangeLog.)


	* XmlReaderCommonTests.cs : added custom assertion overload that takes
	  test label.
	* XmlNodeReaderTests.cs : labeled some.
	* XmlTextWriterTests.cs :
	  Changed the semantics of AttributeNamespacesXmlnsXmlns() and
	  removed NotDotNet (in contrast this test should fail with previous
	  version of XmlTextWriter). See the code comment for details.
	  Added WriteQualifiedNameXmlnsError().


	* System.Xml.dll.sources : removed XmlTextWriterOpenElement.cs and 
	  XmlTextWriter.cs. Added XmlTextWriter2.cs, to be renamed to
	  XmlTextWriter.cs in a few days or weeks.


svn path=/trunk/mcs/; revision=57095
2006-02-21 15:39:10 +00:00