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