* XmlTextWriter.cs : Fixed bug #77082.
When the state was Start, after WriteProcessingInstruction() and
WriteWhitespace() change it to Prolog.
After WriteDocType() set state to WriteState.Element.
* XmlTextWriterTests.cs : added some tests for XMLdecl state check.
* XslTransformTests.cs : Output_Indent_Xml_DocType() is working now.
svn path=/trunk/mcs/; revision=55487
* XmlTextWriter.cs : Do not local duplicate of automatically-created
prefixes (i.e. check local autocreated prefixes other than
namespaces from ancestors). Fixed bug #77086 and #77087.
* XmlTextWriterTests.cs : Split AutoCreatePrefixes() and marked as
Ignore rather than NotWorking. Also it is not for bug #77086 and
#77077 (they were fixed). See bug #77088.
svn path=/trunk/mcs/; revision=55418
* XmlTextWriter.cs : Fixed bug #77094. Only XmlTextWriter checks
such invalid "xml" prefix which is being mapped to different
namespace URI than the predefined one.
Removed comment that does not make sense.
* XmlNamespaceManager.cs : IsValidDeclaration() could be private.
Added some comments.
* XmlTextWriterTests.cs : re-enabled bug #77094 related tests.
svn path=/trunk/mcs/; revision=55414
* XmlWriter.cs : In WriteNode(XPathNavigator, bool), Avoid
ReadSubtree() for non-element content since they are not allowed
in ReadSubtree() (but allowed here).
* XPathNavigator.cs : use WriteNode(XPathNavigator, bool)
rather than WriteNode(XmlWriter, bool) in WriteSubtree().
* XmlWriterTests.cs : added tests for WriteNode(XPathNavigator, bool)
as well as XPathNavigator.WriteSubtree(XmlWriter).
svn path=/trunk/mcs/; revision=55143
* XmlValidatingReader.cs : In ReadTypedValue(), treat Whitespace
nodes as target string nodes as well as other text nodes.
* XsdValidatingReader.cs :
Don't use normalized string as input to AssessStringValid(). It
incorrectly invalidates strings against simple types with length-
related facets.
Now that we don't ignore whitespaces, we need to explicitly allow
pure whitespace texts in ElementOnly/Empty model.
* XmlSchemaSimpleTypeRestriction.cs : maxLength and minLength were
likely to be ignored in ValidateNonListValueWithFacets().
* XmlSchemaValidator.cs : Don't use normalized string value as the
input to AssessStringValid().
* XsdValidatingReaderTests.cs : test for ReadTypeValue() that it
does not ignore whitespace nodes, and it does not normalize string
incorrectly.
svn path=/trunk/mcs/; revision=55129
* XmlValidatingReader.cs : ReadTypedValue() was not working with
non-XmlSchemaDatatype types.
* XsdValidatingReaderTests.cs : test for ReadTypeValue() with simple
type restriction.
svn path=/trunk/mcs/; revision=55127
if value is null or zero-length string. Modified WriteNmToken to throw
ArgumentException if name is null or zero-length string. Cosmetic
change to WriteStringInternal.
* XmlElement.cs: In 2.0 profile, do not throw ArgumentNullException
if new value for Prefix is null.
* XmlElementTests.cs: Improved tests for setting prefix to null
or zero-length string. On 2.0 profile, setting prefix to null should
not result in ArgumentNullException.
* XmlTextWriterTests.cs: Enabled WriteNmToken tests and
WriteWhitespace tests for null or zero-length value.
svn path=/trunk/mcs/; revision=55115
* XmlTextWriter.cs : when namespaceURI is String.Empty, Prefix
should be just ignored (it is likely to happen that DOM nodes
with empty namespace URI are specified non-empty prefix by
users, which had better be just ignored). Fixed bug #77095.
* XmlTextWriterTests.cs : enabled
WriteStartElement_Prefix_EmptyNamespace() and
NamespacesPrefixWithEmptyAndNullNamespaceEmpty().
svn path=/trunk/mcs/; revision=54850
* XmlElement.cs : patch for Prefix property by Vorobiev Maksim.
- null should cause ArgumentNullException.
- "" should not raise an error.
- throws ArgumentException when it is readonly.
* XmlElementTests.cs : Patch by Vorobiev Maksim.
- setting null to Prefix should raise ArgumentNullException.
- setting String.Empty to Prefix should be allowed.
svn path=/trunk/mcs/; revision=54849
* XmlTextWriter.cs : When xml:space or xml:lang attribute was
directly written without an element, it caused ArgumentOutOfRange.
Fixed bug #77084.
* XmlTextWriterTests.cs : XmlSpace_Valid() is working now.
svn path=/trunk/mcs/; revision=54793
* XmlTextWriter.cs : (WriteStartAttribute) set prefix as "xmlns" when
namespaceURI is that of xmlns attributes.
* XmlTextWriterTests.cs : XmlNs_Valid2() is working now.
svn path=/trunk/mcs/; revision=54792
* XmlNode.cs : under 2.0 xml/xmlns are treated as special cases in
GetNamespaceOfPrefix()/GetPrefixOfNamespace() (but it still does not
implement IXmlNamespaceResolver, bummer).
svn path=/trunk/mcs/; revision=54352
* XmlTextReader.cs : when XmlReader.Create() creates this instance,
don't expect strict text declaration. Check SkipTextDeclaration()
on Read().
svn path=/trunk/mcs/; revision=54269
* XmlReader.cs : fixed several misconception in MoveToNextSibling().
It should check its ReadState to avoid infinite loop.
* XmlReaderCommonTests.cs : enabled MoveToNextSibling() tests.
svn path=/trunk/mcs/; revision=54231
* XmlException.cs : added another .ctor() overload that takes both
IXmlLineInfo and innerException.
* XmlQualifiedName.cs : added Parse() overload that takes XmlReader
(since XmlReader is not IXmlNamespaceResolver anymore).
* XmlReader.cs : made several fixes on 2.0 ReadContentAs(),
ReadElementContentAs() and all of its variants.
* XmlReaderCommonTests.cs : added several tests for 2.0 methods.
svn path=/trunk/mcs/; revision=54230
* XmlInputStream.cs :
Added Encoding property on NonBlockingStreamReader
* XmlTextReader.cs :
set Encoding property when it proceeds to xml declaration.
* XmlTextReaderTests.cs : added test for Encoding property.
svn path=/trunk/mcs/; revision=54166
* XmlReader.cs : ReadToDescendant() should work when its ReadState is
Initial.
* XmlReaderCommonTests.cs : added tests for ReadToDescendant() and
ReadToFollowing().
svn path=/trunk/mcs/; revision=54152
* XmlReaderSettings.cs :
set_Schemas() is fixed in 2.0 RTM (it just works).
* XmlResolver.cs : throw ArgumentNullException instead of
ArgumentException when both base and relative urls are null.
* XmlReaderSettingsTests.cs : SetSchemas() should not cause an error.
Added SetSchemasNull() as well.
* XmlUrlResolverTests.cs : (ResolveUriWithNullArgs)
expect ArgumentNullException instead of ArgumentException.
This is a fix in .NET 2.0.
svn path=/trunk/mcs/; revision=54093
* XmlReaderSettings.cs : ProhibitDtd is set as default.
* XmlWriterSettings.cs : no set_OutputMethod.
* XmlReaderCommonTests.cs : use ProhibitDtd=false in CreateSimple()
and added CreateSimpleProhibitDtd().
svn path=/trunk/mcs/; revision=54090
* XmlReader.cs, XmlNode.cs :
[DebuggerDisplay] are not worthy of existing.
* XPathNavigator.cs, XPathNodeIterator.cs :
[DebuggerDisplay] are not worthy of existing.
svn path=/trunk/mcs/; revision=52880
* XmlTokenizedType.cs, XmlNodeOrder.cs : so those enums happen to
have [Serializable] in .NET 1.x, and removed in 2.0 (enums are
anyways serializable, so those attributes do not make sense).
svn path=/trunk/mcs/; revision=52877
* XmlConvert.cs : VerifyNCName() and VerifyName() throws
ArgumentNullException for "".
* XmlConvertTests.cs : some tests for ToInt16(), ToInt32(),
VerifyName() and VerifyNCName().
svn path=/trunk/mcs/; revision=52857
* XmlElement.cs, XmlCDataSection.cs, XmlText.cs, XmlWhitespace.cs,
XmlSignificantWhitespace.cs : added ParentNode overrides (actually
they don't make sense since it just calls base.)
* XmlNode.cs, XmlDocument.cs : changed .NET 2.0 CreateNavigator() impl
to match signature and skip OwnerDocument check in XmlNode (since
it is overriden). Maybe MS does not have ownerDocument as a field and
costs too much on OwnerDocument property.
Added missing bits in XmlDocument.
svn path=/trunk/mcs/; revision=52647
* XmlAttribute.cs : added new overrides in 2.0 RTM (this scarcely
makes sense without real optimization though).
* XmlDocument.cs, XmlElement.cs, XmlNode.cs : avoid ChildNodes and
save extra XmlNodeList creation cost.
svn path=/trunk/mcs/; revision=52646
* XsdValidatingReader.cs : XmlReader.ReadTypedValue() does not exist
anymore, so it is not override.
* XmlNamespaceManager.cs : NameTable is virtual in 2.0 RTM.
* XmlReader.cs : IsEmptyElement is reverted to be abstract in 2.0 RTM.
ReadTypedValue() is removed.
* XmlValidatingReader.cs : ReadTypedValue() is not virtual now.
* XmlWriter.cs : Settings is virtual.
* XPathNodeIterator.cs : added [DebuggerDisplay]. pretty useless tho.
* XPathNavigator.cs : [DebuggerDisplay] as well.
SelectSingleNode() and AppendChildElement() are now virtual.
svn path=/trunk/mcs/; revision=52637
* XPathNavigator.cs : now 2.0 MoveToFirst() invokes internal
MoveToFirstImpl() and it is from what XmlDocumentNavigator did.
This fixes XPathEditableDocument.MoveToFirst().
* XmlDocumentNavigator.cs : now MoveToFirst() invokes internal
MoveToFirstImpl().
svn path=/trunk/mcs/; revision=52108
* XmlTextWriter.cs : (Error state check) actually I need to set Error.
* XmlNamespaceManagerTests.cs : GetNamespacesInScope() - Added test
labels. Fixed counts; they count default namespaces. MS seems to
have a bug on declaration removal (xmlns='') on .Local.
* XmlNodeReaderTests.cs : in .NET 2.0 undeclared entity are not
allowed at all, so disabled tests that depends on such references.
svn path=/trunk/mcs/; revision=52101