Commit Graph
20 Commits
Author SHA1 Message Date
Atsushi Eno 718c8cb031 2005-08-16 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs, XmlTextReader2.cs : added internal .ctor() to
	  receive both TextReader, XmlNodeType and BaseURI for entity
	  resolution (though it would be removed later).
	* XmlParserInput.cs : Now to handle nested PE insertion and correct
	  BaseURI, it internally holds a stack of "input source".
	* DTDObjectModel.cs,
	  DTDReader.cs :
	  Required fixes for XmlParserInput.
	  Handle BaseURI as expected. Added ActualUri for resolved actual
	  source URI (to resolve nested entities). Pass ActualUri to internal
	  XmlTextReader.ctor() in ResolveExternalEntityReplacementText()
	  (well, yes I remember, it is problematic.)

	  Incorrect Base URI handling bug (part of #51495) is fixed.


svn path=/trunk/mcs/; revision=48443
2005-08-16 18:23:16 +00:00
Atsushi Eno f6ccddf3c3 2005-08-16 Atsushi Enomoto <[email protected]>
* DTDReader.cs, XmlParserInput.cs :
	  let's fix #51495. First of all, refactoring.


svn path=/trunk/mcs/; revision=48438
2005-08-16 16:30:00 +00:00
Atsushi Eno 0905ad6b9e 2005-03-22 Atsushi Enomoto <[email protected]>
* XmlParserInput.cs,
	  XmlNode.cs,
	  XmlUrlResolver.cs,
	  DTDValidatingReader.cs : removed/commented out those warned code.


svn path=/trunk/mcs/; revision=42059
2005-03-22 07:09:06 +00:00
Atsushi Eno b0c7f07f28 2005-03-09 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs, XmlParserInput.cs, DTDReader.cs: fix UCM-4
	  surrogate calculations. This fixes bug #73513. Patch by
	  Andrew Skiba.

	* XmlTextReaderTests.cs : added SurrogatePair() based on bug #73513.



svn path=/trunk/mcs/; revision=41610
2005-03-09 18:21:10 +00:00
Atsushi Eno 785a6f581f 2005-03-09 Atsushi Enomoto <[email protected]>
* XmlParserInput.cs : silly mixed line endings :(


svn path=/trunk/mcs/; revision=41608
2005-03-09 17:53:30 +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
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 47029604e8 2004-06-18 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs, DTDReader.cs, XmlConvert.cs, XmlDocument.cs,
	  XmlException.cs, XmlParserInput.cs, XmlTextReader.cs,
	  XmlTextWriter.cs : Globalization.
	* XmlNode.cs : Fixed error message that confused node type.

svn path=/trunk/mcs/; revision=29825
2004-06-18 01:22:07 +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 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 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
Atsushi Eno 9bf15946b2 2004-01-11 Atsushi Enomoto <[email protected]>
* XmlException.cs : Fixed incorrect .ctor signature.
	* XmlParserInput.cs : Fixed in sync with the above fix.

svn path=/trunk/mcs/; revision=21936
2004-01-11 10:47:33 +00:00
Atsushi Eno d86a6f346b 2003-10-19 Atsushi Enomoto <[email protected]>
* XmlChar.cs : added WhitespaceChars, used in common.
	* XmlConvert.cs,
	  XmlDeclaration.cs,
	  XmlParserInput.cs,
	  XmlTextReader.cs,
	  XmlTextWriter.cs : String.Trim()
	* XmlConvert.cs : shifted XmlConstructs to XmlChar.
	* XmlTextReader.cs : Implemented Normalization.

svn path=/trunk/mcs/; revision=19188
2003-10-19 09:23:29 +00:00
Atsushi Eno a02a5b1d9c 2003-10-09 Atsushi Enomoto <[email protected]>
* Added DTDReader.cs. It is almost importation of XmlTextReader.
	* DTDObjectModel.cs :
	  - More .NET-ism. Properties took place of fields.
	  - Imported PE set from XmlTextReader. Added location info.
	  - Added DTDEntityBase common to PE and GE.
	  - More correct text declaration handling with new XmlTextReader.
	* DTDValidatingReader.cs :
	  - Now uses entity resolving XmlTextReader to validate attributes
	    correctly. Implemented standalone
	  - Standalone and default related validity constraints check.
	* XmlImplementation.cs: Implemented HasFeature().
	* XmlNode.cs : Implemented Supports().
	* XmlNodeReader.cs : Modified to use XmlTextReader.SkipTextDeclaration()
	* XmlParserInput.cs : Removed extraneous members.
	* XmlTextReader.cs :
	  - All DTD related functionality now goes to DTDReader.cs
	  - It became old simple TextReader input style.
	  - Implemented GetRemainder().
	  - Implemented ReadBase64(), ReadBinHex() and ReadChars(), using
	    additional new private method ReadUntilEndTag().
	  - Removed incomplete MaybeTextDecl and added SkipTextDeclaration().
	    ReadXmlDeclaration() now became simple.
	  - More strict entity reference check at SetEntityReferenceProperty()
	  - Removed extraneous members.
	* XmlWriter.cs : WriteNode(XmlNodeType.None) does not raise error.

svn path=/trunk/mcs/; revision=18812
2003-10-09 19:13:16 +00:00
Ben Maurer 68ec5ce1a6 Dont make function call to StringBuffer
svn path=/trunk/mcs/; revision=17981
2003-09-07 21:55:47 +00:00
Atsushi Eno cd0ee00b63 2003-08-10 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs : added XmlResolver related members. Added
	  invalid entity recursion logic. Added encodingdecl check on textdecl.
	* DTDValidatingReader.cs : It now implements IHasXmlParserContext.
	* XmlChar.cs : IsPubidChar() should not allow TAB(&#9;).
	* XmlDocumentType.cs : 1) internal CreateDocumentType() was now changed
	  to receive DTDObjectModel to support other than XmlTextReader.
	  2) Most of its public member is now based on DTDObjectModel.
	* XmlDocument.cs : 1) Synchronous change with XmlDocumentType.
	  2) ReadNode() now considers XmlParserContext's DTDObjectModel for
	  other than XmlTextReader (such as XmlValidatingReader).
	* XmlNode.cs : code cleanup only.
	* XmlParserInput.cs : added HasPEBuffer, used to check illegal nesting.
	* XmlTextReader.cs : 1) Illegal entity reference check logic was moved
	  from ReadContent() to SetEntityReferenceProperties(). 2) Indentation
	  change on ReadEntityReference(). 3) ReadAttribute() now checks
	  reference to external entity reference. 4) Added textdecl encoding
	  check. 5) DTDObjectModel fields are now set correctly. 6) added
	  PERef markup nest check. 7) If PEDecl was not found, it might be WFC
	  violation, not only be VC violation. 8) ReadEntityDecl() now receives
	  its declared entity itself, and this method checks IsInternalSubset.
	* XmlValidatingReader.cs : 1) Added GetInternalPerserContext().
	  2) ValidationType.None should be the same as Auto, not DTD (in the
	  future it should keep xml schema's default values).

	Pending Stuff in XmlTextReader which breaks some NUnit tests;
	  1) SetEntityReferenceProperies() has check for illegal references.
	  2) ReadAttribute(bool) has similar check for illegal references.

svn path=/trunk/mcs/; revision=17218
2003-08-10 07:20:07 +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 c169d32335 2003-04-04 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : Load() now closes the given XmlReader.
	  Don't allow creation of XmlTextReader for Doctype. (workaround.)
	* XmlInputStream.cs : It now closes its internal stream explicitly.
	* XmlNode.cs : RemoveChild() bugfix for removing LastLinkedChild.
	* XmlNodeReader.cs : GetAttribute() bugfix for not-present attribute.
	* XmlParserInput.cs : added Close() method.
	* XmlReader.cs : MoveToContent() should (1) not Read in case of empty
	  element, and (2) MoveToElement() in case of attribute.
	* XmlTextReader.cs : Close() now actually closes source TextReaders.

svn path=/trunk/mcs/; revision=13070
2003-04-03 19:03:17 +00:00
Atsushi Eno 8a88d4db75 2003-03-18 Atsushi Enomoto <[email protected]>
* added XmlParserInput.cs for multi xml document sources.
	* added DTDObjectModel.cs (maybe temporary).
	* XmlTextReader.cs :
	  + fixed ctor to use XmlStreamReader. Allowed null XmlParserContext.
	  + Some members such as LineNumber, ReadChar now uses XmlParserInput.
	  + added support for Namespaces (namespace-ignorant parse available).
	  + added support for XmlResolver.
	  + replace SetReaderContext()/SetReaderFragment() with Initialize().
	  + use NameTable in CreateNameString.
	  + fixed ReadCData(). Now reads "]]]>" correctly.
	  + support for DTD parse.
	  + Read() now throws an error when it reached EOF while Depth > 0.
	* XmlAttribute.cs,
	  XmlDocumentFragment.cs,
	  XmlElement.cs : fix related to the changes of XmlTextReader.Initialize
	* XmlDocument.cs : ReadNode() now reads DocumentType.
	* XmlDocumentType.cs : implemented Entities, Notations, WriteTo().
	* XmlEntity.cs,
	  XmlNotation.cs : added override LastLinkedChild (for doctype node).
	* XmlNamedNodeMap.cs : Remove() raises an error if target is read only.
	* XmlElement.cs : bugfix for node removal of set_InnerXml.
	* XmlNode.cs : added insertBeforeIntern() derived from InsertBefore().
	  (to append child XmlEntity into XmlDocumentType correctly.)
	* XmlInputStream.cs : fixed to access file with FileAccess.Read.

svn path=/trunk/mcs/; revision=12619
2003-03-17 16:01:36 +00:00