Commit Graph
514 Commits
Author SHA1 Message Date
Lluis Sanchez f90024c138 * XmlTextWriter.cs: In WriteStartAttribute, when the prefix is xmlns and
the name is empty, convert it to a xmlns attribute.

svn path=/trunk/mcs/; revision=26909
2004-05-07 12:16:06 +00:00
Ben Maurer b3e8df5aa1 more readonly/const
svn path=/trunk/mcs/; revision=26467
2004-04-30 21:11:55 +00:00
Atsushi Eno a9e66d5cae 2004-04-27 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : don't use NET_1_0.

svn path=/trunk/mcs/; revision=26047
2004-04-27 09:26:42 +00:00
Atsushi Eno 1034c62002 2004-04-24 Atsushi Enomoto <[email protected]>
* XmlComment.cs. XmlProcessingInstruction.cs : missing commits.

svn path=/trunk/mcs/; revision=25939
2004-04-24 14:36:28 +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 087038913c 2004-04-24 Atsushi Enomoto <[email protected]>
* XmlDeclaration.cs : More strict check on InnerText and Value.

svn path=/trunk/mcs/; revision=25933
2004-04-24 12:10:48 +00:00
Atsushi Eno a5e122f6a2 2004-04-24 Atsushi Enomoto <[email protected]>
* DTDReader.cs, XmlConvert.cs, XmlDeclaration.cs, XmlImplementation.cs,
	  XmlNode.cs : Culture independency fix.

svn path=/trunk/mcs/; revision=25929
2004-04-24 10:15:09 +00:00
Martin Baulig dfedf08d98 2004-04-22 Martin Baulig <[email protected]>
Renamed the `NET_1_2' conditional to `NET_2_0' in all files.

svn path=/trunk/mcs/; revision=25877
2004-04-23 02:24:02 +00:00
Atsushi Eno 65911b5298 2004-04-22 Atsushi Enomoto <[email protected]>
* XmlEntityReference.cs : Added XPathNodeType (just for workaround).
	  This should really fix bug #57248.

svn path=/trunk/mcs/; revision=25800
2004-04-21 23:30:39 +00:00
Atsushi Eno efbe5ce8d5 2004-04-20 Atsushi Enomoto <[email protected]>
* XmlDocumentNavigator.cs : MoveToFirstChild() failed when there is
	  only an EntityReference (not navigatable) child. Bug #57248 fixed.
	* XmlWriter.cs : Modified WriteNode() to use MoveToAttribute(int)
	  instead of WriteAttributes() only for MS.NET behavior compatibility.
	  This change makes SgmlReader usable (due to SgmlReader bug).

svn path=/trunk/mcs/; revision=25718
2004-04-20 11:59:33 +00:00
Atsushi Eno 15384d4307 2004-04-10 Atsushi Enomoto <[email protected]>
* XmlParserContext.cs : Fixed .ctor() not to reference null namespace
	  manager. This fixes bug #56770.

svn path=/trunk/mcs/; revision=25268
2004-04-10 01:46:06 +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 b123e6f7c5 2004-04-05 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs : (DTDAttributeDefinition) create ArrayList
	  only when they are required.
	* DTDReader.cs,
	  XmlParserInput.cs : raw tag string now don't have to be kept, while
	  it cost so much. Removed unused code. 20% to 30% memory got saved.
	* XmlNotation.cs : removed unused code.
	* XmlTextReader.cs : Removed unused code. ReadString() now uses
	  XmlReader's internal method. Fixed BaseURI to be conformant with
	  W3C XML InfoSet and (subsequently) xml:base specification (i.e.
	  reflect xml:base attribute correctly).

svn path=/trunk/mcs/; revision=25026
2004-04-05 09:32:48 +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 22937e9d73 2004-03-31 Atsushi Enomoto <[email protected]>
* XmlDocumentNavigator.cs : When this instance is created from xmlns
	  attributes, it should be Namespace node.

svn path=/trunk/mcs/; revision=24838
2004-03-31 12:59:35 +00:00
Atsushi Eno fc0cf34f1a 2004-03-27 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadInnerXml() should progress reader when it is on
	  an empty element. This fixes bug #56064.

svn path=/trunk/mcs/; revision=24662
2004-03-27 22:14:43 +00:00
Atsushi Eno dcdf2745d6 2004-03-27 Atsushi Enomoto <[email protected]>
* DTDReader.cs : In some places sequential parameter entity was
	  incorrectly skipped (and caused invalid result).

svn path=/trunk/mcs/; revision=24661
2004-03-27 22:00:44 +00:00
Atsushi Eno 5e6c273dd5 2004-03-24 Atsushi Enomoto <[email protected]>
* XmlDocumentNavigator.cs : MoveTo*Namespace() should not iterate
	  namespace nodes which has the same name as already-iterated nodes.
	  Also xmlns='' should not be selected, and once it appeared, default
	  namespace should not be selected anymore.

svn path=/trunk/mcs/; revision=24531
2004-03-24 18:20:14 +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 3aee5d6284 2004-03-24 Atsushi Enomoto <[email protected]>
* XmlAttributeCollection.cs : Remove() should throw an exception when
	  target attribute is not included in the collection.
	* XmlDocument.cs : ImportNode() should reject null node.
	* XmlNode.cs : Fixed type of exception for invalid insertion.
	  It should throw an exception not only when the owner document of the
	  reference element is different but its parent element is different.
	  Some error message improvement.

svn path=/trunk/mcs/; revision=24509
2004-03-24 02:21:48 +00:00
Atsushi Eno 0a270288b5 2004-03-21 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadInnerXml() incorrectly tried to get output xml.
	  This fixes bug #55856.

svn path=/trunk/mcs/; revision=24384
2004-03-21 06:02:29 +00:00
Atsushi Eno 3e55c81d52 2004-03-20 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : Fixed indentation on CDATA. This fixes bug #55828.

svn path=/trunk/mcs/; revision=24361
2004-03-20 00:35:54 +00:00
Atsushi Eno 2e584078f8 2004-03-19 Atsushi Enomoto <[email protected]>
* XmlImplementation.cs : HasFeature() returns true when strVersion
	  is null.

svn path=/trunk/mcs/; revision=24329
2004-03-19 14:31:06 +00:00
Atsushi Eno e681d0520d 2004-03-16 Atsushi Enomoto <[email protected]>
* XmlWhitespace.cs : Fixed WriteTo(). Whitespace nodes should be
	  written regardless of document's PreserveWhitespace.

svn path=/trunk/mcs/; revision=24178
2004-03-16 22:27:08 +00:00
Atsushi Eno 3df559acfa 2004-03-16 Atsushi Enomoto <[email protected]>
* XmlDocumentNavigator.cs : Value should return concatenated string for
	  sequential text nodes. Considered detached nodes, the result of
	  MoveToParent() should be checked.

svn path=/trunk/mcs/; revision=24107
2004-03-16 04:32:32 +00:00
Atsushi Eno 587c901565 2004-03-15 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadInnerXml()/ReadOuterXml() should not bork when
	  the reader is on EndElement. Patch by Jean-Marc Andre.

svn path=/trunk/mcs/; revision=24032
2004-03-15 02:48:44 +00:00
Atsushi Eno 1d94aed7e1 2004-03-14 Atsushi Enomoto <[email protected]>
* XmlDocumentNavigator.cs : as for namespace node "xml", MS.NET seems
	  to return attribute node. It affects on IHasXmlNode.GetNode() and
	  SelectNodes()/SelectSingleNode().

svn path=/trunk/mcs/; revision=24020
2004-03-14 19:24:16 +00:00
Atsushi Eno 3210914acc 2004-03-04 Atsushi Enomoto <[email protected]>
* XmlImplementation.cs : fixity fix (I need NUnit runnable ;)

svn path=/trunk/mcs/; revision=23694
2004-03-04 16:52:12 +00:00
Atsushi Eno 4361873dd2 2004-03-04 Atsushi Enomoto <[email protected]>
* XmlImplementation.cs : forgot to commit (renaming internal case)

svn path=/trunk/mcs/; revision=23693
2004-03-04 16:41:57 +00:00
Atsushi Eno e5a9c1000b 2004-03-04 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : Implementation should not return null.

svn path=/trunk/mcs/; revision=23691
2004-03-04 16:28:49 +00:00
Atsushi Eno 40c75c7f96 2004-02-25 Atsushi Enomoto <[email protected]>
* XmlTextWriterOpenElement.cs : Reset() should reset _all_ fields.
	  This fixes indentation bug.

svn path=/trunk/mcs/; revision=23436
2004-02-25 11:07:18 +00:00
Atsushi Eno ad5a737d48 2004-02-19 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : Fixed bugzilla #54554 (incorrent end tag output).

svn path=/trunk/mcs/; revision=23246
2004-02-19 04:30:50 +00:00
Atsushi Eno 822f455b93 2004-02-16 Atsushi Enomoto <[email protected]>
* DTDAutomata.cs,
	  DTDObjectModel.cs,
	  DTDReader.cs,
	  DTDValidatingReader.cs : made classes internal.
	* XmlDocument.cs : removed extra FIXMEs.
	* XmlNamedNodeMap.cs,
	  XmlResolver.cs,
	  XmlUrlResolver.cs :
	  Fixed incorrect method signature.

svn path=/trunk/mcs/; revision=23142
2004-02-16 19:04:50 +00:00
Ben Maurer 9f5c60087b 2004-02-15 Ben Maurer <[email protected]>
* DTDValidatingReader.cs: simple optimization. there is only
	one string, skip the string builder and just return the string.

svn path=/trunk/mcs/; revision=23103
2004-02-15 05:49:49 +00:00
Atsushi Eno 27496c3d66 2004-02-13 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs, DTDReader.cs, DTDValidatingReader.cs :
	  say goodbye to sys.collections.specialized.
	  (replaced the classes in that namespace with ArrayList or Hashtable)

svn path=/trunk/mcs/; revision=23073
2004-02-13 20:08:50 +00:00
Atsushi Eno ee779c6dd8 2004-02-12 Atsushi Enomoto <[email protected]>
* XmlReader.cs : For performance reason, XmlTextReader now uses
	  base ReadInnerXml() and don't store currentTag array unnecessarily.
	* XmlTextReader.cs :
	  - Fixed GetAttribute(int) that might cause index out of range.
	  - Now it consumes the text reader by reading blocks, as MS.NET does.
	    Modified GetRemainder(), PeekChar(), ReadChar() and so on.
	  - Now it doesn't create Value string for linked nodes, unless it
	    is actually required.
	  - some code refactory.

svn path=/trunk/mcs/; revision=23041
2004-02-12 20:33:00 +00:00
Atsushi Eno d43e2ed2ea oops, commited incomplete log.
svn path=/trunk/mcs/; revision=22967
2004-02-11 03:53:40 +00:00
Atsushi Eno c37ea7b26d 2004-02-11 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs, XmlTextWriterOpenElement.cs.

svn path=/trunk/mcs/; revision=22966
2004-02-11 03:50:03 +00:00
Atsushi Eno 9bd7b7cfc6 2004-02-10 Atsushi Enomoto <[email protected]>
* XmlNode.cs : ChildNodes should not create XmlNodeListChildren
	  every time. This fix heavily improved performance.

svn path=/trunk/mcs/; revision=22937
2004-02-10 08:33:28 +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 ad968a22b0 2004-02-05 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : ToSingle() and ToDouble() should be culture
	  independent. Patch by Rodolfo Campero.

svn path=/trunk/mcs/; revision=22779
2004-02-05 03:10:05 +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 a540306d7f 2004-02-03 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs, DTDReader.cs : fixity fix ;)

svn path=/trunk/mcs/; revision=22744
2004-02-03 15:28:44 +00:00
Atsushi Eno 80b1ad3644 2004-02-03 Atsushi Enomoto <[email protected]>
* ChangeLog : Fixed incorrect description that should be written for
	  DTDValidatingReader.cs but written for DTDReader.cs.
	* DTDValidatingReader.cs : Fixes described in the last DTDReader fix.

	* XmlChar.cs,
	  XmlConstructs.cs : Made XmlChar and XmlConstructs equivalent and
	  replaced XmlChar with XmlConstruts, renaming "XmlChar" to
	  "XmlCharCompact" and "XmlConstructs" to "XmlChar".
	  (XmlChar will be used for compact framework.)
	* DTDReader.cs, XmlParserInput.cs, XmlTextReader.cs :
	  XmlChar related changes.  Support for surrogate pair.
	  It cannot use TextReader's peek anymore (for surrogate pair).
	  Character range check for PI value, attribute value, text
	* XmlTextWriter.cs : Change openElements from Stack to ArrayList.
	  (It calls ToArray() every time.)

svn path=/trunk/mcs/; revision=22741
2004-02-03 15:04:03 +00:00
Alon Gazit 044ccb28ca now Item(int index) returns null for nodeList.Count
instead of throwing ArgumentOutOfRangeException.

svn path=/trunk/mcs/; revision=22736
2004-02-03 12:46:45 +00:00
Atsushi Eno 949ccf26e7 2004-02-03 Atsushi Enomoto <[email protected]>
* XmlChar.cs : now GetPredefinedEntity() returns int and -1 for not
	  predefined entity names.
	* DTDObjectModel.cs : DTDxxxCollection now derives from
	  - DTDCollectionBase that derives from DictionaryBase.
	  - "Literal value" and "replacement text" are handled differently.
	  - Throw XmlException when external entity could not be resolved.
	  - Return ReplacementText for EntityValue.
	* DTDReader.cs :
	  - Support IXmlLineInfo.
	  - Fixed IGNORE section handling to be more strict.
	  - Compute replacement text on reading entity declarations.
	  - Don't expand char references before getting literal entity value.
	  - Check not allowed parameter entity inside internal subset.
	  - Added ValidateWhitespaceNode() to check whitespace's Validity
	    Constraints on external elementdecl and standalone document.
	  - When invalid data against its datatype was found, don't throw
	    parse error.
	  - Other code refactory.
	* XmlTextReader.cs :
	  - Check for invalid Text pattern "]]>" should not depend on line
	    info since it might not be supported.
	  - Check referenced character's validity (WFC).

svn path=/trunk/mcs/; revision=22730
2004-02-03 08:07:35 +00:00
Atsushi Eno fa84bb251d 2004-01-28 Atsushi Enomoto <[email protected]>
* DTDReader.cs : Added Normalization.  Parameter Entity declaration
	  should block invalid characters. (GEDecl should be fixed as well.)
	* XmlConstruct.cs : Should allow surrogate chars.
	* XmlNotation.cs : When prefix is empty (i.e. almost all cases)
	  Name should not add ':'. Patch by Boris Kirzner.
	* XmlTextReader.cs : Modified private ReadCharacterReference() to
	  return the character (or -1 when should not return anything).
	  Now Text character reference are checked their character range.
	  Set DTDReader.Normalization as well as the reader itself.

svn path=/trunk/mcs/; revision=22580
2004-01-28 16:27:49 +00:00
Atsushi Eno 2ea27f0a02 2004-01-28 Atsushi Enomoto <[email protected]>
* DTDReader.cs : Make sure that parameter entities are not allowed
	  inside internal subset unless it appears as a markupdecl.
	* DTDValidatingReader.cs : ENTITY or ENTITIES type attributes must have
	  a value that indicates *unparsed* entity (i.e. NDATA required).

svn path=/trunk/mcs/; revision=22567
2004-01-28 07:21:05 +00:00