Commit Graph
105 Commits
Author SHA1 Message Date
Marek Safar 5b82f0e08c Clean up some NET_2_0 2012-06-14 15:44:35 +01:00
Atsushi Eno 2b68d146fa 2009-11-11 Atsushi Enomoto <[email protected]>
* XmlDocument.cs, XmlElement.cs, XmlAttribute.cs,
	  XmlAttributeCollection.cs :
	  when CreateElement() and/or CreateAttribute() are overriden,
	  use overriden method. Otherwise, use internal optimal ones.
	  Fixed bug #549839.


svn path=/trunk/mcs/; revision=145920
2009-11-11 04:27:02 +00:00
Atsushi Eno da362d6d88 2009-02-09 Atsushi Enomoto <[email protected]>
* XmlElementTest.cs: SetAttribute(name,value) should identify value
	  change for existing node, from new node insertion.
	  Fixed bug #464394.

	* XmlElementTests.cs : added test for bug #464394.



svn path=/trunk/mcs/; revision=126323
2009-02-09 09:31:23 +00:00
Atsushi Eno a6e2f53a1d 2006-09-19 Atsushi Enomoto <[email protected]>
* XmlElement.cs : for non-atomized names, alter null prefix with "".
	  Fixed bug #79420.

	* XmlElementTests.cs : added test for #79420.
	* XmlAttributeTests.cs : added similar test.
	* XmlDocumentTests.cs : fix warnings.


svn path=/trunk/mcs/; revision=65621
2006-09-19 05:13:39 +00:00
Atsushi Eno c463f3240d 2006-03-28 Atsushi Enomoto <[email protected]>
* XmlNameEntry.cs XmlNameEntryCache.cs :
	  Added atomization support for prefixed names.
	  Inspired by Joshua Tauberer's patch.
	* XmlElement.cs XmlAttribute.cs : use above.


svn path=/trunk/mcs/; revision=58637
2006-03-28 03:44:08 +00:00
Atsushi Eno c01749afbc 2006-02-28 Atsushi Enomoto <[email protected]>
* XmlElement.cs : (WriteTo) use IsEmpty to determine which to use:
	  WriteEndElement() and WriteFullEndElement(). Fixed sys.security
	  regression.


svn path=/trunk/mcs/; revision=57395
2006-02-28 15:59:55 +00:00
Atsushi Eno 87841487b3 2006-02-20 Atsushi Enomoto <[email protected]>
* XmlElement.cs : make use of HasAttributes. Remove extra check.
	  10% speed improvement.


svn path=/trunk/mcs/; revision=57079
2006-02-20 19:48:12 +00:00
Atsushi Eno b2ebb226a7 2006-02-17 Atsushi Enomoto <[email protected]>
* XmlElement.cs : NextSibling could be effectively computed using
	  LastLinkedChild, beyond previous XmlLinkedNode optimization.


svn path=/trunk/mcs/; revision=57011
2006-02-17 19:03:46 +00:00
Atsushi Eno cbc55bdc39 2006-02-16 Atsushi Enomoto <[email protected]>
* IHasXmlChildNode.cs :
	  New internal interface to hold LastLinkedChild.
	* XmlNodeListChildren.cs XmlEntity.cs XmlElement.cs XmlAttribute.cs
	  XmlLinkedNode.cs XmlEntityReference.cs XmlNode.cs
	  XmlDocumentFragment.cs XmlDocument.cs : use it. It minimizes memory
	  consumption in XmlText, XmlWhitespace, XmlComment etc.

	* System.Xml.dll.sources : added IHasXmlChildNode.cs.


svn path=/trunk/mcs/; revision=56945
2006-02-16 15:46:11 +00:00
Atsushi Eno 4bacaff049 2006-01-30 Atsushi Enomoto <[email protected]>
* XmlDocument.cs, XmlAttribute.cs, XmlElement.cs : Avoid unnecessary
	  name checks in CreateElement() and CreateAttribute().
	  get_DocumentType() could be stopped when the iterated child node
	  is the document element.
	* XmlNode.cs : removed commented lines.
	* XmlNameEntry.cs : hash code for a name entry is mostly identical by
	  its local name, so avoid extraneous GetHashCode() especially on
	  namespaces.



svn path=/trunk/mcs/; revision=56270
2006-01-30 19:30:59 +00:00
Atsushi Eno 2b419d3520 2006-01-28 Atsushi Enomoto <[email protected]>
* XmlElement.cs, XmlAttribute.cs :
	  Avoid ChildNodes.Count and use FirstChild/NextSibling.


svn path=/trunk/mcs/; revision=56208
2006-01-28 17:33:24 +00:00
Atsushi Eno f98a6cf05b 2006-01-27 Atsushi Enomoto <[email protected]>
* XmlNode.cs,
	  XmlDocument.cs,
	  XmlAttribute.cs,
	  XmlElement.cs :
	  Added internal AppendChild() override that omites node type
	  checking, and used it in many places.


svn path=/trunk/mcs/; revision=56151
2006-01-27 08:38:28 +00:00
Gert Driesen cd7644c997 * XmlTextWriter.cs: Modified WriteWhitespace to throw ArgumentException
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
2006-01-05 20:16:41 +00:00
Atsushi Eno d120a4fc6e 2005-12-26 Atsushi Enomoto <[email protected]>
* 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
2005-12-26 14:33:20 +00:00
Atsushi Eno 6d7725e5bb 2005-11-07 Atsushi Enomoto <[email protected]>
* 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
2005-11-07 11:42:17 +00:00
Atsushi Eno bc2aba513c 2005-11-07 Atsushi Enomoto <[email protected]>
* 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
2005-11-07 10:37:57 +00:00
Atsushi Eno 2da6c2e2c0 2005-09-21 Atsushi Enomoto <[email protected]>
* XmlNodeReader2.cs, XmlReader.cs,
	  XmlTextReader.cs, XmlTextReader2.cs,
	  XmlNodeChangedEventArgs.cs, XmlElement.cs,
	  XmlNode.cs, XmlDocument.cs :
	  updated NET_2_0 API.

	* XmlReaderSettingsTests.cs : updated NET_2_0 related tests.
	* NameTableTests.cs : numbered testcases. fixed argument order.


svn path=/trunk/mcs/; revision=50351
2005-09-21 02:58:41 +00:00
Atsushi Eno 5d693154f9 2005-02-25 Atsushi Enomoto <[email protected]>
* XmlComment.cs, XmlNode.cs, XmlText.cs, XmlProcessingInstruction.cs,
	  XmlEntityReference.cs, XmlSignificantWhitespace.cs, XmlAttribute.cs,
	  XmlElement.cs, XmlEntity.cs, XmlCDataSection.cs :
	  For those nodes that are created by Clone(), IsReadOnly is false.
	  Patch by Konstantin Triger.

	* XmlNodeTests.cs : added Clone() of readonly node returns a node
	  that is not readonly.



svn path=/trunk/mcs/; revision=41185
2005-02-25 09:39:56 +00:00
Martin Baulig 06dbf17232 2005-01-25 Martin Baulig <[email protected]>
* XmlNode.cs (XmlNode.SchemaInfo): Mark this as not CLS-compliant
	to avoid a CS3025.

	* XmlReaderSettings.cs (XmlReaderSettings.XmlResolver): Mark this
	as not CLS-compliant to avoid a CS3025.


svn path=/trunk/mcs/; revision=39449
2005-01-25 01:02:31 +00:00
Atsushi Eno e65be58d88 2005-01-18 Atsushi Enomoto <[email protected]>
* XmlNode.cs,
	  XmlAttribute.cs,
	  XmlAttributeCollection.cs :
	  Now reuse parentNode field for XmlAttribute.OwnerElement and
	  reduce class allocation size.
	* XmlNameEntry.cs :
	  New class that represents a name triplet.
	  XmlNameEntryCache.cs :
	  New type to cache name entries.
	* XmlAttribute.cs,
	  XmlElement.cs :
	  Replace name strings with name entry and save class allocation size.
	  XmlDocument.cs :
	  Add name entry cache field to document and reuse name entries that 
	  are already allocated.



svn path=/trunk/mcs/; revision=39086
2005-01-18 10:41:55 +00:00
Atsushi Eno f305240c9c 2004-12-16 Atsushi Enomoto <[email protected]>
* XmlSchemaInfo.cs : added internal copy constructor.

	* XmlReader.cs : added MoveToFollowing().
	* XmlNode.cs,
	  XmlElement.cs,
	  XmlAttribute.cs : added SchemaInfo support.
	* XmlDocument.cs : added Schemas and Validate().
	  ReadNode() now copies xmlReader's SchemaInfo.
	* XmlNodeReader.cs : ditto (just reflects node's SchemaInfo).

	* SubtreeXmlReader.cs, XmlFilterReader.cs :
	  Override SchemaInfo to return input reader's SchemaInfo.



svn path=/trunk/mcs/; revision=37829
2004-12-16 12:16:32 +00:00
Atsushi Eno 16dd4c5974 2004-11-26 Atsushi Enomoto <[email protected]>
* XmlReader.cs : not fixage, just explicitly formatted code a bit.
	* XmlTextReader.cs,
	  XmlEntity.cs,
	  XmlAttributeCollection.cs,
	  XmlTextWriter.cs,
	  XmlElement.cs,
	  XmlNode.cs,
	  DTDObjectModel.cs,
	  XmlParserInput.cs,
	  DTDReader.cs,
	  XmlDocument.cs : warning removal.



svn path=/trunk/mcs/; revision=36587
2004-11-26 02:51:06 +00:00
Atsushi Eno 71008c0e66 2004-11-08 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs, XmlElement.cs : get_Name should consider name table.
	* XmlDocument.cs : use NameTable in Load() and LoadXml().
	* XmlReader.cs : In Create(), use NameTable in XmlReaderSettings.

svn path=/trunk/mcs/; revision=35808
2004-11-08 06:32:35 +00:00
Atsushi Eno 301bc7b905 2004-08-30 Atsushi Enomoto <[email protected]>
* XmlElement.cs : XmlAttributeCollection doesn't have to be created
	  every time until the actual use. This sometimes optimizes
	  attribute-less XML performance siginificantly.

svn path=/trunk/mcs/; revision=33008
2004-08-30 01:21:56 +00:00
Atsushi Eno 31285c4397 2004-08-21 Atsushi Enomoto <[email protected]>
* XmlElement.cs : set_InnerText was removing children incompletely.
	  This fixes bug #63574.

svn path=/trunk/mcs/; revision=32615
2004-08-21 01:53:05 +00:00
Duncan Mak 8fa6e766dd Add MIT license to System.XML.DLL
svn path=/trunk/mcs/; revision=30055
2004-06-21 18:07:31 +00:00
Atsushi Eno 4190429496 2004-05-12 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs,
	  DTDReader.cs,
	  XmlDocument.cs,
	  XmlInputStream.cs,
	  XmlParserInput.cs,
	  XmlTextReader.cs,
	  XmlUrlResolver.cs : removed reference to Mono.Xml.
	  Made Mono.Xml.* classes internal.
	* XmlDocument.cs : output xml declaration for TextWriter output in Save()
	* XmlElement.cs : Name character check should be done in .ctor().
	* XmlNamespaceManager.cs : Removed dangerous internal .ctor()

svn path=/trunk/mcs/; revision=27149
2004-05-12 09:11:19 +00:00
Atsushi Eno 268271966d 2004-04-24 Atsushi Enomoto <[email protected]>
W3C DOM compliant read-only check support (buggy part in MS.NET).
	* XmlAttribute.cs,
	  XmlCDataSection.cs,
	  XmlCharacterData.cs,
	  XmlDocument.cs,
	  XmlElement.cs,
	  XmlNode.cs,
	  XmlSignificantWhitespace.cs,
	  XmlText.cs
	  : CloneNode() - set read-only when copied node is read-only.
	    Check IsReadOnly on attempt to modify value.
	* XmlEntity.cs,
	  XmlEntityReference.cs : Set descendant nodes read-only.
	* XmlAttributeCollection.cs,
	  XmlNode.cs
	  : Fixed incompatible exception type.
	* XmlEntityReference.cs : CloneNode() should not pass an empty string
	  as its name.
	* XmlEntityReference.cs,
	  XmlProcessingInstruction.cs : Check XML name validity.
	* XmlText.cs : CloneNode() does not have to check children.

svn path=/trunk/mcs/; revision=25938
2004-04-24 14:23:56 +00:00
Atsushi Eno 5c9cf1e30d 2004-04-05 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : get_Value should return all children's value.
	* XmlCharacterData.cs : DOM's substring does not raise an error when
	  startIndex + count exceeds the length of Data.
	* XmlNamedNodeMap.cs : SetNamedItem() returns the new child when it
	  does not replace another named item.
	* XmlElement.cs : with related to the XmlNamedNodeMap change,
	  SetAttributeNode() is required to fix as to return null when it does
	  not replace existing attribute.

svn path=/trunk/mcs/; revision=25018
2004-04-05 03:35:08 +00:00
Atsushi Eno 0e242ba0a0 2004-02-10 Atsushi Enomoto <[email protected]>
* XmlAttributeCollection.cs : set owner element as parent on removal
	  events (though they are not "parent" in infoset or dom context)
	* XmlElement.cs : Don't remove attributes twice (raises extraneous
	  removal events).
	* XmlNamespaceManager.cs, XmlNodeChangedEventArgs :
	  Added NET_1_2 members.

svn path=/trunk/mcs/; revision=22933
2004-02-10 05:41:09 +00:00
Atsushi Eno 8256002451 2004-02-08 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs : Limit external entity reference from DTD by 256.
	  foreach elimination.  DTDParameterEntityDeclaration should set Root.
	  Compute attribute default value without raising an error.
	  (for non-error reporting reader)
	* DTDReader.cs : Fixes for the above fixes. foreach elimination.
	* DTDValidatingReader.cs, NameTable.cs, XmlAttribute.cs,
	  XmlAttributeCollection.cs, XmlChar.cs, XmlConstruct.cs,
	  XmlDocumentFragment.cs, XmlDocumentNavigator.cs, XmlElement.cs,
	  XmlEntityReference.cs, XmlNamedNodeMap.cs, XmlNode.cs,
	  XmlText.cs : foreach elimination.
	* XmlDocument.cs, XmlSignificantWhitespace.cs, XmlWhitespace.cs :
	  foreach elimination. Removed unnecesary methods.
	* XmlTextReader.cs : code format refactory. Optimized some methods.
	  foreach elimination. Replaced Stack with string array.
	  Replaced StringBuilder with char array. Removed unnecessary methods.

svn path=/trunk/mcs/; revision=22891
2004-02-08 20:27:04 +00:00
Atsushi Eno c90d6dba5b 2004-02-06 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs : Fixed MoveToElement() that causes incorrect
	  IsDefault and Depth.
	* XmlAttribute.cs : Fixed .ctor(). Omit more namespace check when
	  checkNamespace = false.
	* XmlNamedNodeMap.cs : Fixed SetNamedItem() to raise events.
	* XmlAttributeCollection.cs : Reimplemented InsertAfter to use
	  InsertBefore() (similar to XmlNode).
	* XmlDocument.cs : Added internal .ctor().  Reimplemented ReadNode()
	  as recursive, to make event order compatible.
	* XmlDocumentType.cs : Use SetNamedItem() (to raise events).
	* XmlElement.cs : Some refactory.  Fixed SetAttributeNode() with
	  string name to block prefixed name.
	* XmlEntity.cs : Don't raise events on setting contents.
	* XmlNode.cs : Some refactory. Added raiseEvent argument to internal
	  InsertBefore().
	* XmlEntityReference.cs : related fix for XmlNode change.
	* XmlTextReader.cs : When the reader is on "attributes" of xmldecl or
	  doctype, Depth 1 lower than usual attribute. Split large function.

svn path=/trunk/mcs/; revision=22799
2004-02-05 16:05:56 +00:00
Atsushi Eno fdf21b83be 2004-02-04 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs : Never expand entity on ScanEntityValue().
	* DTDValidatingReader.cs : XmlDeclaration node requires attributes
	  to be movable.
	* XmlAttribute.cs,
	  XmlDocument.cs,
	  XmlDocumentFragment.cs,
	  XmlElement.cs,
	  XmlEntity.cs,
	  XmlLinkedNode.cs,
	  XmlNode.cs,
	  XmlNotation.cs :
	  Added namespace checking flag (required for such xml readers
	  that holds Namespaces=false). Now only XmlNode holds LastLinkedNode.
	* XmlDocumentType.cs,
	  XmlEntity.cs,
	  XmlEntityReference.cs : The children of Entity and EntityReference
	  became correct. They now holds parsed nodes, but it is only when
	  they are appended to the document.
	* XmlNode.cs : Modified insertBeforeIntern() to InsertBefore() with
	  boolean checkNodeType argument.  This method also tries to create
	  Entity's and EntityReference's child nodes.  Also added internal
	  RemoveChild() with boolean checkNodeType argument.
	* XmlNodeReader.cs : Quick hack for ResolveEntity() that became
	  broken with these changes. use InnerXml as input to entityReader.
	* XmlTextReader.cs : XmlDeclaration's value LocalName should be the
	  same as Name.  The names of DTD's pseudo attributes should be empty.
	  Fixed DTD node's Depth (was regarded as attribute value's depth).

svn path=/trunk/mcs/; revision=22767
2004-02-04 17:48:06 +00:00
Atsushi Eno 5dc2265c13 2004-01-26 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs :
	  - DTDNode's BaseURI should not always refer to that of DTD's.
	  - Use absolute URI's .ToString() instead of AbsolutePath.
	* DTDReader.cs : Throw XmlException for illegal character references.
	* DTDValidatingReader.cs :
	  - Share XmlResolver when the actual reader is XmlTextReader.
	    (MS's XmlValidatingReader and XmlTextReader do this.)
	  - Added its own EntityHandling property.
	* XmlValidatingReader.cs : Share XmlResolver with XmlTextReader.
	* XmlReader.cs,
	  XmlTextReader.cs : Added new NET_1_2 members.
	* XmlElement.cs : Removed extra lines (caused by XmlTextWriter bugs).
	* XmlEntityReference.cs : Forgot to add, the real fix by Boris.

svn path=/trunk/mcs/; revision=22509
2004-01-26 18:25:39 +00:00
Atsushi Eno 516d8f8acc 2004-01-22 Atsushi Enomoto <[email protected]>
* XmlElement.cs : Reverted previous fix since it broke monodoc web
	  service.

svn path=/trunk/mcs/; revision=22411
2004-01-22 20:17:29 +00:00
Atsushi Eno 48199379da 2004-01-20 Atsushi Enomoto <[email protected]>
* XmlNode.cs : When adding a node to child list, it should reject its
	  ancestors. Patch by Boris Kirzner.
	* XmlNodeReader.cs : Related fix to the fix above. It should not move
	  to children of XmlEntityReference nodes.
	* XmlTextWriter.cs : FixedWriteStartElement() not to write default
	  namespace when ns is null (while ns is "", it writes default ns).
	* XmlElement.cs : Fixed WriteTo() to call WriteStartElement(localName)
	  when NamespaceURI is an empty string.

svn path=/trunk/mcs/; revision=22286
2004-01-20 07:39:06 +00:00
Atsushi Eno dc421281b0 2004-01-12 Atsushi Enomoto <[email protected]>
* XmlElement.cs : Fixed .ctor(). Default attribute was not treated as
	  Specified = false. Patch by Boris Kirzner.

svn path=/trunk/mcs/; revision=22004
2004-01-13 03:25:01 +00:00
Atsushi Eno e66ea433af 2004-01-08 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs, XmlElement.cs :
	  Fixed incorrect protected .ctor modification.

svn path=/trunk/mcs/; revision=21836
2004-01-08 02:52:39 +00:00
Atsushi Eno aa61a23fc0 2004-01-07 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs, XmlDocument.cs, XmlElement.cs :
	  set_Prefix should atomize to name table.
	  Avoided extraneous atomization attempt a bit.

svn path=/trunk/mcs/; revision=21803
2004-01-07 12:26:28 +00:00
Atsushi Eno e1658172d0 2003-12-21 Atsushi Enomoto <[email protected]>
* XmlDocument.cs, XmlElement.cs, XmlNode.cs :
	  GetElementsByTagName() - Fixed bugzilla #52419, refactored,
	  and moved private implementation methods to XmlNode class.

svn path=/trunk/mcs/; revision=21399
2003-12-21 17:04:21 +00:00
Atsushi Eno da54c77a46 2003-12-12 Atsushi Enomoto <[email protected]>
* XmlAttributeCollection.cs,
	  XmlElement.cs : Fixed bug #51415.
	  When adding attribute to an element using Attributes, it failed.

svn path=/trunk/mcs/; revision=21059
2003-12-12 07:13:08 +00:00
Atsushi Eno 5f6674b5da 2003-10-25 Atsushi Enomoto <[email protected]>
* DTDReader.cs, DTDValidatingReader.cs, XmlInputStream.cs,
	  XmlTextReader.cs : More cleanup.
	* XmlDocument.cs : Removed CheckName(). Code cleanup.
	* XmlElement.cs : .ctor() now adds default attributes (if required).
	* XmlAttribute.cs, XmlElement.cs, XmlEntity.cs, XmlEntityReference.cs,
	  XmlNotation.cs : Now uses OwnerDocument's NameTable.

svn path=/trunk/mcs/; revision=19404
2003-10-26 03:39:03 +00:00
Atsushi Eno f3b6ece17d 2003-10-04 Atsushi Enomoto <[email protected]>
* XmlDocumentFragment.cs,
	  XmlElement.cs,
	  XmlEntityReference.cs : Removed extraneous MonoTODO.
	* XmlNode.cs : Implemented Normalize().
	* XmlNodeReader.cs :
	  - AttributeCount and HasAttributes should return its owner element's
	    value, to be consistent with XmlTextReader.
	  - Fixed Depth to reflect correct attribute/attribute-value iteration.
	  - simplified ownerElement and HasValue.
	  - Prefix won't return null.
	  - MoveToElement() should also work against attribute value nodes.
	* XmlTextReader.cs : MoveToElement() should return false if it is
	  positioned at element itself.

svn path=/trunk/mcs/; revision=18589
2003-10-04 15:09:59 +00:00
Atsushi Eno 54cf27af0a 2003-08-08 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs :
	  Fixed Initialize() that might result in incorrect buffer.
	  CanRead and Position should consider buffer (especially when the
	  stream was EOF).
	  CanSeek should use stream's CanSeek.

	* XmlChar.cs : added GetPredefinedEntity().
	* DTDObjectModel.cs :
	  - Modified ComputeDefaultValue() to use it.
	  - Fixed NormalizedDefaultValue not to expect parsed value as string.
	  - ResolveExternalEntity now detects invalid standalone specification.
	  - DTDParameterEntityDeclaration.Value is now changed to property and
	    keep its resolved value of literal value of external value using
	    new Resolve (XmlResolver) method (called only by XmlTextReader).
	* DTDValidatingReader.cs :
	  - It now handles entity-expanded Whitespace and SignificantWhitespace
	    correctly. Does not raise unexpected text not allowed error.
	  - Fixed MoveToAttribute()s to move internal reader correctly, and
	    should be able to move in other cases than on element node.
	  - On Read()ing document type and ResolveEntity(), it now sets
	    XmlResolver on text reader.
	  - On ID constraints check and type verification, it now uses
	    normalized attribute or its tokenized value(s).
	  - Fixed ValidateAttributes() to add default values when
	    ValidationType is Auto.
	* XmlParserContext.cs : added internal Dtd setter.
	* XmlParserInput.cs :
	  InsertParameterEntityBuffer() should add surrounding whitespaces.
	  Removed unused code block.
	* XmlTextReader.cs :
	  - Modified ReadReference(), ReadAttribute() and Dereference() to use
	    XmlChar.GetPredefinedEntity().
	  - When returning entity reference, it checks extity declaration
	    existence in certain conditions.
	  - ReadAttribute() now skips general entity replacement on reading
	    entity value.
	  - ReadText() now handles whitespace texts as XmlNodeType.Whitespace.
	  - ReadXmlDeclaration() holds isStandalone, which might be used in
	    entity reference's well-formedness check.
	  - internal 'DTD' now uses XmlParserContext.Dtd.
	  - isInternalSubset was meaningless. Now uses input stack's Count.
	  - Added some required SkipWhitespace().
	  - Several parameter entity handling changes.  Added GetPEValue(name).
	    TryExpandPERef() now uses ImportAsPERef(). ReadParameterEntityDecl()
	    now uses its Resolve() when it was external PE.  Now it uses value
	    buffer instead of currentTag, to efficiently read (included) PE.
	    CompileDeclaration() now uses ImportAsPERef instead of ExpandPERef().
	    ImportAsPERef() simply inserts the value to currentInput.
	    ReadEntityDecl() also uses value buffer.   Removed non-used methods.
	  - Default attributes are now stored in normalized form.
	  - Dereference() now considers non-expanding predefined entities.
	* XmlValidatingReader.cs : now holds Schemas, and ValidationType.Auto
	  is more correctly supported.

	* XmlAttributeCollection.cs :
	  When removing default attribute, it immediately inserts the attribute.
	  RemoveAll() should consider default (not-removable) attributes.
	* XmlDocument.cs :
	  Should have its default XmlResolver. Added Internal Resolver.
	  Some Load() should use its XmlResolver.
	  ImportNode() should copy its children in node level, not value level.
	  It also have to consider not to copy default attribute on importing
	  XmlElement.
	* XmlDocumentType.cs : Now uses document's XmlResolver to read DTD.
	* XmlAttribute.cs,
	  XmlDocumentFragment.cs.
	  XmlElement.cs : use XmlResolver on InnerXml. Removed some MonoTODO.
	* XmlNodeReader.cs : GetInternalParserConext() should provide its DTD.
	  ResolveEntity() uses XmlResolver on entityReader.

svn path=/trunk/mcs/; revision=17202
2003-08-09 09:48:35 +00:00
Atsushi Eno 3de188080d 2003-07-31 Atsushi Enomoto <[email protected]>
* XmlParserContext.cs,
	  XmlAttribute.cs,
	  XmlElement.cs : Added internal Dtd and new internal XmlParserContext
	  .ctor() that takes DTDObjectModel. And then rewrote classes which
	  uses DTD information. Changed DocTypeName, InternalSubset, PublicId
	  and SystemId to use DTDObjectModel.
	* DTDObjectModel.cs :
	  Added DTDObjectModel.InternalSubsetHasPEReference.
	  Added DTDEntityDeclaration.IsInternalSubset.
	* XmlTextReader.cs :
	  Added internal GetInternalParserContext (to build entity reader).
	  Added private isIntSubset to check if the DTD subset is internal or
	  external, which might affect well-formedness constraints.
	  Changed GenerateDTDObjectModel to return the resulting DTD model.

	* XmlEntityReference.cs : implemented BaseURI.
	* XmlNodeReader.cs :
	  - Implemented ResolveEntity() and CanResolveEntity(). In fact
	    it leads too many changes on almost all methods and properties,
	    since they now must be aware of entityReader.
	  - fixed ownerElement that might be used to return from attribute
	    value to the element through parent attribtues.
	  - Now changed indexer to call GetAttribute() and moved actual logic
	    to the matching GetAttribute() methods.

svn path=/trunk/mcs/; revision=16946
2003-07-31 18:01:50 +00:00
Atsushi Eno e4fa13f616 2003-07-28 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs : (Read,ValidateAttributes,ReadAttributeValue)
	  attribute declaration should be got independently of elementdecl.
	* XmlAttribute.cs :
	  Added internal SetDefault() to mark as default.
	  Removed InnerText implementation that is just the same as XmlNode.
	* XmlDocument.cs : id shouldn't be removed from table at 'trying' to
	  get matching elements.  ReadAttributeNode() now sets default mark.
	* XmlElement.cs : WriteTo() should ignore default attributes.
	* XmlTextWriter.cs : shuold allow valid name char such as digits.

svn path=/trunk/mcs/; revision=16783
2003-07-28 18:14:16 +00:00
Atsushi Eno 155737a339 2003-07-26 Atsushi Enomoto <[email protected]>
* XmlDocumentType.cs :
	  modified private DTD to dtd and added internal DTD (the same thing).
	* XmlElement.cs :
	  Fixed SetAttributeNode() to check if specified attribute is already
	  set to the other element. In fact it is W3C DOM's specification but
	  MS.NET 1.0 failed to catch it.
	* XmlTextReader.cs :
	  ReadAttributeValue() should check if the value of the attribute is
	  already read when the whole value is entity reference.
	  Also, Name of text nodes should be "", not "#text"

svn path=/trunk/mcs/; revision=16716
2003-07-26 19:38:37 +00:00
Atsushi Eno 86b8448fdb 2003-07-12 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs,
	  XmlElement.cs : Fixed CloneNode() for bug #46129.
	* XmlDocument.cs : Fixed MakeReaderErrorMessage that specified invalid
	  String.Format arguments, and basically XmlException.ctor(
	  IXmlLineInfo, message) seems good idea to use.
	* XmlTextReader.cs :
	  - Fixed .ctor(Stream, XmlNodeType, XmlParserContext) which had
	    required non-null context which don't have to exist.
	  - Added state check. Introduced 'currentState' and 'maybeTextDecl'
	    (for external entity) and removed hasEnteredDocument. Added
	    state-check logic to ReadStartTag(), ReadEndTag(), ReadText(),
	    ReadCData(), ReadDoctypeDecl() and ReadWhitespace().
	  - Replaced throw ReaderError() with throw new XmlException() and
	    fixed that some error hadn't thrown, only created.
	  - ResetState() should re-initialize existing private members other
	    than some specified fields.
	  - Private AddAttribute() should check if the same-named attribute
	    already exists.
	* DTDObjectModel.cs : Additive declaration for ATTLIST is availabe now.

svn path=/trunk/mcs/; revision=16131
2003-07-12 07:39:25 +00:00
Atsushi Eno 4533c5e1ff 2003-07-06 Atsushi Enomoto <[email protected]>
* XmlElement.cs : IsEmpty has removed attributes since it incorrectly
	  used RemoveAll().

svn path=/trunk/mcs/; revision=15986
2003-07-06 16:54:25 +00:00
Atsushi Eno 3f7e68b275 2003-07-06 Atsushi Enomoto <[email protected]>
* XmlElement.cs : Removed extraneous xmlns output support (it should
	  be done by XmlTextWriter).
	* XmlNode.cs : InsertBefore() now checks validity of the newChild (and
	  most of the changes are in fact indentation changes).
	* XmlWriter.cs : WriteAttributes() now can write entity references.
	  WriteNode() now writes xmldecl attributes correctly.
	  Removed namespaceManager and xmlns check logic, since it should be
	  done by individual XmlTextWriter.
	* XmlTextWriter.cs : Patch by Jerome. AddMissingElementXmlns () has
	  written multiple xmlns declarations.
	  Moved namespaceManager from abstract XmlWriter.
	  Write{Start|End}Attribute() and WriteString() now checks xmlns
	  attribute value. (MS.NET holds value only with this write method).

svn path=/trunk/mcs/; revision=15982
2003-07-06 16:10:39 +00:00