Commit Graph
75 Commits
Author SHA1 Message Date
Marek Safar 0f7de17e3f Remove 1.1 only members with wrong profile check 2012-04-16 17:35:59 +01:00
Marek Safar d365718f2b Fix some API mismatch 2012-04-05 15:46:25 +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 95f31f664c 2006-05-09 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : (WriteTo) when the namespace URI is empty,
	  always use empty string for prefix.

	* XmlAttributeTests.cs : added NonEmptyPrefixWithEmptyNS().


svn path=/trunk/mcs/; revision=60438
2006-05-09 11:55:53 +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 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
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
Gert Driesen 92ba341131 * XmlAttribute.cs: InnerText and InnerXml do not override getters in
NET_2_0. Removed extra CLSCompliant attribute on SchemaInfo.
* XmlReaderSettings.cs: Marked sealed.

svn path=/trunk/mcs/; revision=51464
2005-10-08 11:23:54 +00:00
Atsushi Eno f50bd018f8 2005-10-01 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs, XmlDocument.cs : check id table updates when
	  XmlAttribute.set_Value() was invoked. Fixed bug #76311.

	* XmlAttributeTests.cs : test for bug #76311.


svn path=/trunk/mcs/; revision=51080
2005-10-01 18:34:38 +00:00
Atsushi Eno 657284b696 2005-08-04 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : When there was only one child in attribute
	  and it was an entity reference, set_Value() tried to set text value
	  and thus failed.

	* XmlAttributeTests.cs : Test if set_Value() works in such cases that
	  there was only one child in attribute and it was an entity reference.


svn path=/trunk/mcs/; revision=47993
2005-08-04 09:34:09 +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
Atsushi Eno 71fa56f043 2005-02-25 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : MS does not reject non-NCName prefix. Patch by
	  Konstantin Triger.

	* XmlAttributeTests.cs : added nonNCName Prefix case.


svn path=/trunk/mcs/; revision=41181
2005-02-25 06:50:09 +00:00
Atsushi Eno 72734a59d4 2005-02-16 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : just use InnerText for Value. Patch by Andrew
	  Skiba.
	* XmlConvert.cs : Handle null and empty strings for EncodeName(),
	  EncodeLocalName() and EncodeNmToken(). Patch by Andrew Skiba.
	* NameTable.cs : usually tail of namespaces are rather different than
	  head of them. Patch by Andrew Skiba.
	* XmlUrlResolver.cs : missing %20 handling. Patch by Andrew Skiba.


svn path=/trunk/mcs/; revision=40757
2005-02-16 16:25:46 +00:00
Atsushi Eno 78f19205da 2005-02-15 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : For default attributes, WriteTo() writes nothing
	  under MS.NET.
	* DTDValidatingReader.cs : reduced indentation using Linus trick
	  (it was too deep in nest).



svn path=/trunk/mcs/; revision=40691
2005-02-15 11:51:00 +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 687a961cb8 2005-01-17 Atsushi Enomoto <[email protected]>
* XmlNode.cs, XmlAttribute.cs : reverted the previous patch. It broke
	  several nunit tests.

	  ..Missed the commits except for ChangeLog :(


svn path=/trunk/mcs/; revision=39021
2005-01-17 14:34:45 +00:00
Ben Maurer acdce6f0fd 2005-01-15 Ben Maurer <[email protected]>
* XmlNode.cs (InnerText, AppendChildValues): Don't allocate a
	string in the case where nothing needs to be appended.

	* XmlAttribute.cs (BuildChildValue): Start out the string with
	`null' not `String.Empty'. String.Concat (null, blah) == blah,
	pointerwise. ie, there is no allocation. This makes it so that
	getting the value of an attribute is faster for the fast case.


svn path=/trunk/mcs/; revision=38983
2005-01-16 02:51:22 +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 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 a144b12327 2004-08-27 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : some property getters threw NullReferenceException
	  when the attribute is not added to an element.
	* XmlNode.cs : When a node is not appended to another node, BaseURI
	  is empty. Bug #64120 is fixed.

svn path=/trunk/mcs/; revision=32914
2004-08-27 00:36:03 +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 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 865fccec0d 2004-04-06 Atsushi Enomoto <[email protected]>
* DTDReader.cs : In ProcessDTDSubset(), 1)error message was
	  generated with incorrect stream character, 2)entity nest check
	  should not depend on line info which might not be supplied, 3)
	  empty PE should be skipped.
	* XmlParserInput.cs : use index for StringBuilder instead of calling
	  Remove() many times. This highly optimizes DTD parser.

	* XmlAttribute.cs : removed commented code.
	* XmlEntity.cs : removed unused field.

svn path=/trunk/mcs/; revision=25070
2004-04-06 01:42:14 +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 ca7962559c 2004-03-24 Atsushi Enomoto <[email protected]>
* XmlCharacterData.cs : ReplaceData() should reject negative integer
	  value for count argument.
	* XmlAttribute.cs, XmlAttributeCollection.cs, XmlNamedNodeMap.cs :
	  On RemoveNamedItem(), default attribute value should be restored.

svn path=/trunk/mcs/; revision=24511
2004-03-24 03:45:22 +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 4a3a3b770d 2004-01-14 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : when set a value, it is no longer default
	  (even if the value is the same as default value).
	* XmlAttributeCollection.cs : Remove() should recover default attribute
	  value to default, not specified value.
	  Patch by Boris Kirzner (modified a bit)
	* XmlDocument.cs : Reference to undeclared entity is not allowed in
	  Load(), while allowed in ReadNode(). Added such distinguishing logic.

svn path=/trunk/mcs/; revision=22052
2004-01-14 07:55:50 +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 d0d1b1e4ad 2003-11-28 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : set_Prefix checks value when existing is "xmlns".

svn path=/trunk/mcs/; revision=20592
2003-11-28 16:59:28 +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 b9afb3f024 2003-10-13 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : Fixed InnerText that did not removed its content
	  if there is two or more children.
	* XmlNode.cs : XmlNode.cs : Fixed bugzilla #49580 (1)to return "",
	  (2)not to compare NodeType for detached nodes, (3)optimization to
	  compare element's prefix.
	* XmlSecureResolver.cs : Removed extraneous members.

svn path=/trunk/mcs/; revision=18948
2003-10-13 03:08:07 +00:00
Atsushi Eno 6cd4bcc7f3 2003-10-04 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : Removed extraneous MonoTODO.
	* XmlTextWriter.cs : Implemented WriteBinHex() and WriteChars().
	  WriteStartElement() and WriteStartAttribute() should ignore Prefix
	  if namespace uri is not specified.

svn path=/trunk/mcs/; revision=18594
2003-10-04 17:42:01 +00:00
Atsushi Eno 2b05aa1793 2003-09-21 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs :
	  - Fix for bugzilla #48337 (containing Ben's advice on that).
	  - Added internal XmlTokenInfo classes. Nodes are now handled as token
	    objects (linked node, attributes and attribute values). Most of the
	    node state properties and iterating methods are changed to refer to
	    the token classes (except for value builder availability). Removed
	    fields which are never used. CompileDTDSubset() is changed in
	    reflection to nodeType field removal.
	  - Fixed Depth that should vary in moving between attributes and/or
	    reading attribute values.
	  - LineNumber and LinePosition now returns more correct location.
	  - Fixed Value that should still return true if its value is an empty
	    attribute value string.
	  - EntityValue is checked WFC constraints even thoug it is not used.
	  - All .ctor() now initializes ReadState as Initial.
	  - Read() should be available for attribute value constructor.
	* XmlAttribute.cs : set_InnerXml() now calls reader's Read().

svn path=/trunk/mcs/; revision=18240
2003-09-21 08:05:31 +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 344d80fd69 2003-07-26 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs : .ctor() shouldallow localName "xml" (not prefix)
	  with http://www.w3.org/XML/1998/namespace.
	* XmlEntity.cs : patch by Aleksey Sanin. InnerText is now supported.
	* XmlNode.cs : InnerText should handle CDATA and whitespaces.
	* XmlTextReader.cs : Should allow " (#PCDATA)* " in ReadContentSpec().
	* XmlTextWriter.cs : Quick fix for accepting (and writing) same-named
	  attributes (as MS.NET does). It isn't good way and I may change it.

svn path=/trunk/mcs/; revision=16702
2003-07-26 08:47:54 +00:00
Atsushi Eno d4d3fb6421 2003-07-15 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs :
	  .ctor() should reject xml- or xmlns-prefixed node.
	* XmlNamespaceManager.cs :
	  added some xmlns validity check.
	* XmlNode.cs :
	  optimized GetNamespaceOfPrefix() and GetPrefixOfNamespace() by
	  avoiding XmlNamespaceManager creation.
	* XmlNodeReader.cs :
	  doctype node should return PUBLIC and SYSTEM for its indexer,
	  and Value should be internal subset,

svn path=/trunk/mcs/; revision=16266
2003-07-15 16:57:25 +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
Zoltan Varga b1658fb138 2003-06-10 Zoltan Varga <[email protected]>
* XmlAttribute.cs: Accept a null prefix or namespaceURI.

svn path=/trunk/mcs/; revision=15269
2003-06-10 09:49:55 +00:00
Atsushi Eno 7ff3fe6a23 2003-05-24 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs, XmlCharacterData.cs, XmlComment.cs, XmlDocument.cs,
	  XmlDocumentFragment.cs, XmlElement.cs, XmlEntity.cs, XmlLinkedNode.cs,
	  XmlNode.cs, XmlNotation.cs, XmlProcessingInstruction.cs, XmlReader.cs,
	  XmlSignificantWhitespace.cs, XmlText.cs, XmlWhitespace.cs:
	  Reverted the recent accessibility mistake (5/16).
	* XmlDocument.cs, XmlNode.cs : moved actual CreateNavigator() logic
	  from XmlNode to XmlDocument.

svn path=/trunk/mcs/; revision=14836
2003-05-23 16:38:07 +00:00
Atsushi Eno c80e582449 2003-05-18 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : patch by Jonathan Hogg. Flush() does not close
	  any open attributes or elements. WriteWhitespace() checks state and
	  closes start tag.  Fixed WriteStringInternal() to replace CR/LF chars
	  when it is called inside attribute value.
	* XmlException.cs : added .NET 1.1 .ctor.
	* added XmlSecureResolver.cs (only stubbing).
	* XmlAttribute.cs : set_InnerXml() should remove children.
	* XmlAttribute.cs,
	  XmlElement.cs,
	  XmlDocumentFragment.cs,
	  XmlDocument.cs : removed XmlTextReader reuse (It was buggy stuff).
	* XmlNode.cs : RemoveAll() should also remove all attributes.
	* XmlTextRader.cs : .ctor() for attribute value reader should add
	  quotations at initialization, since it requires quote chars.
	* XmlWriter.cs : WriteAttributeString() more correct xmlns check.

svn path=/trunk/mcs/; revision=14655
2003-05-18 07:30:05 +00:00
Atsushi Eno d758de53b7 2003-05-16 Atsushi Enomoto <[email protected]>
* changed XPathNodeType modifier to internal *protected* override.
	* XmlAttribute.cs : .ctor() now checks name validity e.g. xmlns.
	* XmlAttribute.cs, XmlElement.cs : set_Prefix checks NCName validity.
	* XmlAttributeCollection.cs : removed some incorrect TODO attributes.
	* XmlDocument.cs ; CreateAttribute(name) now auto-completes xmlns NSURI
	  when the argument is "xmlns".
	* XmlElement.cs : more compliant IsEmpty support. See also WriteTo().
	* XmlNamespaceManager.cs : added initial "xml" and "xmlns" namespaces.
	* XmlNode.cs : ser_InnerXml() throws InvalidOperationException.
	* XmlNodeReader.cs : LookupNamespace() refactory. Fixed ReadInnerXml()
	  not to set error state for non-started XmlNodeReader.
	* XmlTextReader.cs : fixed ReadAttributeValue() not to reset state.
	  BaseURI support. Fixed Initialize() to handle Attribute correctly.
	  SetProperty for attribute auto-completes xmlns NSURI.
	  Attribute and whitespace handling became more correct.
	  Don't parse external DTD if XmlResolver is null.
	* XmlTextWriter.cs : implemented WriteEntityRef().
	  WriteStartAttribute() checks if ns does not equal to that of xmlns.
	* XmlWriter.cs : trivial refactoring (WriteNode() xmldecl output).

svn path=/trunk/mcs/; revision=14613
2003-05-15 20:13:22 +00:00