Commit Graph
40 Commits
Author SHA1 Message Date
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Rodrigo Kumpera 8752d92528 Kill MOONLIGHT from System.Xml. 2013-02-11 16:03:40 -05:00
Marek Safar d5d4b9c22b Fix some warnings 2012-06-08 12:48:08 +01:00
Miguel de Icaza ae0feab435 Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported 2012-06-01 18:04:24 -04:00
Atsushi Eno a84476bb6d auto-detect UTF16-LE too. 2011-04-06 20:20:07 +09:00
Atsushi Eno 7c23f96f71 Auto detect BOM-less utf-16 and utf-32. Fixed bug #674580. 2011-03-09 15:56:16 +09:00
Atsushi Eno 1632203a41 2010-07-06 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : it had been failing to retrieve correct
	  encoding due to insufficient buffer reading. Fixed bug #615499.


svn path=/trunk/mcs/; revision=159967
2010-07-06 15:53:46 +00:00
Atsushi Eno 92eb7cee6b 2010-04-28 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : minimize initial buffer size so that it does
	  not mostly block some readers. Fixed bug #591291.


svn path=/trunk/mcs/; revision=156280
2010-04-28 06:11:30 +00:00
Jb Evain 846150badd use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153673
2010-03-16 12:31:23 +00:00
Geoff Norton 601bca785f 2010-02-20 Geoff Norton <[email protected]>
* XmlInputStream.cs: Disable this codepath on monotouch.  Fixes
        #562155

svn path=/trunk/mcs/; revision=152143
2010-02-20 20:27:04 +00:00
Atsushi Eno ca5cc074aa 2009-07-22 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : cosmetic exception type change. Patch by
	  Hib Eris. Fixed bug #523971.

	* XmlTextReaderTests.cs : added test for bug #523971 by Hib Eris.


svn path=/trunk/mcs/; revision=138369
2009-07-22 08:38:04 +00:00
Marek Safar 2be4aa8ed9 Warnings cleanup
svn path=/trunk/mcs/; revision=111842
2008-08-28 17:11:51 +00:00
Jb Evain d6a4cd0089 2007-08-04 Jb Evain <[email protected]>
* XmlInputStream.cs: there's no ASCII encoding in 2.1.

svn path=/trunk/mcs/; revision=83743
2007-08-09 12:57:04 +00:00
Atsushi Eno fee29e205c 2005-12-09 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs :
	  Added Encoding property on NonBlockingStreamReader
	* XmlTextReader.cs :
	  set Encoding property when it proceeds to xml declaration.

	* XmlTextReaderTests.cs : added test for Encoding property.


svn path=/trunk/mcs/; revision=54166
2005-12-09 16:37:22 +00:00
Atsushi Eno de3ddcb8ca 2005-12-09 Atsushi Enomoto <[email protected]>
* XmlChar.cs : removed incorrect comment.
	* XmlReader.cs : Create() clones XmlReaderSettings (if supplied).
	  For wrapped XmlReader, check ConformanceLevel to be consistent.
	* XmlTextReader.cs, XmlTextReader2.cs : added get_Conformance for
	  internal use. Removed unused fields.
	* XmlInputStream.cs : updated NonBlockingStreamReader to the latest
	  StreamReader (it is almost a copy).

	* XmlReaderSettingsTests.cs : added some ConformanceLevel tests.
	  Added CreateClonesSettings() to make sure XmlReader.Create() clones
	  XmlReaderSettings.


svn path=/trunk/mcs/; revision=54151
2005-12-09 06:43:34 +00:00
Vladimir Krasnov bd6ec6e434 XmlInputStream.cs: fixed Initialize method to be able to read unicode file without BOM. TARGET_JVM only.
svn path=/trunk/mcs/; revision=53180
2005-11-17 14:57:06 +00:00
Atsushi Eno 0bd75036c7 2005-05-06 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : Now XmlStreamReader uses non-blocking TextReader
	  that is mostly copied from StreamReader. It should fix bug #74161.


svn path=/trunk/mcs/; revision=44109
2005-05-06 05:45:14 +00:00
Atsushi Eno 5b8aa4a2f8 2005-02-22 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : XmlParserContext was not properly popped on
	  the expected timing and thus had lost BaseURI, XmlSpace and XmlLang.


svn path=/trunk/mcs/; revision=41021
2005-02-22 08:33:53 +00:00
Gonzalo Paniagua Javier 18a02e4348 2004-12-03 Gonzalo Paniagua Javier <[email protected]>
* XmlTextReader.cs: don't use \0 as buffer terminator.
	* XmlInputStream.cs: s/Array.Copy/Buffer.BlockCopy/.


svn path=/trunk/mcs/; revision=36995
2004-12-03 08:37:45 +00:00
Atsushi Eno d29e193f42 2004-10-28 Atsushi Enomoto <[email protected]>
* XmlChar.cs, XmlConstructs.cs :
	  Switched again, for reducing per-process memory consumption.
	* XmlInputStream.cs :
	  Just 64 bytes of buffer would be enough, for example like
	  <?xml version="1.0" encoding="iso-8859-15" standalone="yes" ?>

svn path=/trunk/mcs/; revision=35382
2004-10-28 03:01:13 +00:00
Atsushi Eno 93314cd44c 2004-07-09 Atsushi Enomoto <[email protected]>
* XmlAttributeCollection.cs : In .net 2.0, it became sealed class.
	* IXmlDataEvidence.cs : not "Evidences" but "Evidence".
	* XmlInputStream.cs : new csc rejected implicit int->char cast.
	* XmlNamespaceManager.cs : In net_2_0, LookupNamespace(string) and
	  LookupPrefix(string) does not require argument string as atomized.
	  Added HasNamespace (string, bool).
	* XmlReader.cs : Added Settings and SchemaInfo properties.
	* XmlReaderSettings.cs : Added NameTable. Throw XmlException when
	  attempt to set Schemas.
	* XmlTextReader.cs : Fixed "Evidences" to "Evidence". new csc rejected
	  implicit int->char cast.
	* XmlValidatingReader.cs : Fixed "Evidences" to "Evidence".

svn path=/trunk/mcs/; revision=30919
2004-07-09 06:30:18 +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 fd1f7cc1c4 2004-06-14 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : Fixed encoding detection detected in xslt
	  standalone tests. Removed extraneous code.

svn path=/trunk/mcs/; revision=29467
2004-06-14 01:58:22 +00:00
Gonzalo Paniagua Javier bdc9cd0b33 2004-06-07 Gonzalo Paniagua Javier <[email protected]>
* XmlInputStream.cs: Initialize reads a larger buffer now when trying
	to guess the encoding.

svn path=/trunk/mcs/; revision=28964
2004-06-07 13:52:46 +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 e22ed2eb99 2003-12-16 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs : Validity check and entity expansion were
	  incorrectly mixed.
	* DTDObjectModel.cs, DTDReader.cs, XmlInputStream.cs :
	  Going to remove XmlInputStream. XmlStreamReader might be replacable.

svn path=/trunk/mcs/; revision=21242
2003-12-16 15:38:15 +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 293bd1fdc8 2003-08-10 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : Reverted CanSeek as to return false anyway.

svn path=/trunk/mcs/; revision=17221
2003-08-10 09:00:36 +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 87249885f7 2003-08-07 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs :
	  - Added validation error check (and AddError(), Errors).
	  - Fixed ComputeDefaultValue() to handle various references correctly.
	  - DTDEntityDeclaration.EntityValue became property, and added
	    LiteralEntityValue. The new one holds resolved value.
	    Added ResolveExternalEntity(). It now required root in .ctor().
	* DTDValidatingReader.cs :
	  - Now it handles namespaced attributes (as input to xsd validator).
	  - Added XmlResolver property as usual XmlReader.
	  - Added currentEntityHandling field so that it can stand changing
	    XmlValidatingReader's EntityHandling dynamically.
	  - FilterNormalization() now requires name for getting datatypes and
	    can stand for non-current attribute normalization.
	  - Splitted ReadContent() from Read() that can be called recursively
	    when expanding entities.
	  - Now handles Entity not found error *after* resolution of entities,
	    as MS.NET does.
	  - Read()ing DTD checks its Errors and raises validation error events.
	    In some situations, DTD parsing may detect VC error, not WFC error.
	    It also strictly checks NData existence.
	  - Handling of entity-resolved text is a bit changed and Read()ing
	    element, endElement, cdata now changed to switch collecting text
	    and collected text.
	  - content type ANY should allow texts.
	  - Added enumerated attribute validity check.
	  - Added Name/Names creation rule check for ID/IDREF/IDREFS.
	  - Added entity existence check for ENTITY/ENTITIES attributes.
	  - Added NMTOKEN creation rule check for NMTOKEN/NMTOKENS.
	  - Fixed to remove extraneous #REQUIRED check.
	  - Contributing default attribute is now only applied to the case
	    ValidationType is DTD or None.
	  - ResolveEntity() now handles external entities.
	    Added Mono.Xml.IXmlParserContext interface support.
	* XmlDocumentType.cs : Fixed to use BaseURI to build DTD model.
	* XmlTextReader.cs :
	  - Fixed ReadAttributeValue() to reset returnEntityReference.
	  - Added bool MaybeTextDecl only for ResolveEntity().
	  - Fixed ReadWhitespace(). In fact its value is considered even if it
	    is in the end of the XML.
	  - Fixed ReadXmlDeclaration(). Now skips text declaration.
	  - CompileDTDSubset() now checks IGNORE/INCLUDE section end balances.
	  - ReadContentSpec() should set OrderType = OR for mixed model.
	    Fixed to set content element name correctly.
	  - ImportAsPERef() now skips Text declaration.
	  - Type of enumerated default attributes shold be string.
	  - Undeclared PE error is now handled as DTD's VC error, not
	    XmlTextReader's WFC error.
	* XmlValidatingReader.cs : BaseURI should provide that of
	  original XmlReader's when read was not started yet.
	  Fixed XmlResolver to delegate to DTDValidatingReader.

	* XmlAttributeCollection.cs : Acquiring attList declaration is
	  insufficient especially in case of lack of elementdecl.
	* XmlChar.cs : (Maybe this is compact than XmlConstructs.)
	  added IsWhitespace(),IsNCNameChar(),IsName(),IsNCName(),IsNmToken(),
	  IsPubid(). Copies IsValidIANAEncoding() from XmlConstructs.

	* XmlInputStream.cs : Removed "version" declaration check. It should
	  be done by XmlTextReader.

	* XmlNodeReader.cs : added internal GetInternalParserContext() and now
	  it can be used in XmlValidatingReader.ResolveEntity().
	  ResolveEntity() sets XmlTextReader.MaybeTextDecl.

svn path=/trunk/mcs/; revision=17167
2003-08-07 22:08:17 +00:00
Atsushi Eno 7d140166d1 2003-06-20 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : quick fix for public ctor() BaseURI bug.

svn path=/trunk/mcs/; revision=15522
2003-06-20 19:12:57 +00:00
Atsushi Eno c1afba2caf 2003-06-16 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : fixed MoveToNextAttribute(). In some cases
	  this method set current node null.
	* XmlTextReader.cs : fixed GetAttribute (name, ns), which returned
	  String.Empty instead of null (expected value).
	* XmlTextReader.cs,
	  XmlUrlResolver.cs,
	  XmlInputStream.cs : fixed BaseURI problem (bug #44231).

svn path=/trunk/mcs/; revision=15440
2003-06-16 16:57:39 +00:00
Atsushi Eno ae5864eff3 2003-04-23 Atsushi Enomoto <[email protected]>
* Added missing ChangeLog of 4/4/2003.
	* XmlTextWriter.cs : patch by Erik. fixed WriteQualifiedName.
	  (write prefix instead of ns.)
	* XmlInputStream.cs : file access mode fix (FileAccess.Read was missing)
	* XmlTextReader.cs : modified to call Read() instead of ReadContent().
	  (It may be required for decorated reader such as XmlValidatingReader.)
	  Changed Read() error message for mismatch end tag.
	* XmlDocument.cs : (ReadNode) friendly message for mismatch EndElement.
	* XmlReader.cs : Corrected misinterpreted MoveToContent() method.

svn path=/trunk/mcs/; revision=13901
2003-04-22 17:55:29 +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 ca363e80b2 2003-03-19 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Fixed wrong notationdecl SYSTEM id read.
	* XmlInputStream.cs : Should allow versionless input stream entity.

svn path=/trunk/mcs/; revision=12663
2003-03-18 19:58:03 +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
Atsushi Eno 5a8beb8931 2003-03-15 Atsushi Enomoto <[email protected]>
* XmlConstructs.cs : fix "int IsXXX()" to reject negative value.
	* XmlDocument.cs : simplify Load(string url) to use XmlTextReader.
	  fixed ReadNode(), it should call reader.Read() only on Initial state.
	* XmlInputStream.cs : Changed namespace. Added XmlStreamReader(stream)
	  and XmlStreamReader (string). Fixed XmlInputStream(url) not to use
	  System.Net.WebClient directly.
	* XmlParserContext.cs : baseURI don't be null.
	* XmlTextWriter.cs : use WebName for Encoding instead of HeaderName.
	* XmlUrlResolver.cs : namespace change for XmlInputStream.

svn path=/trunk/mcs/; revision=12517
2003-03-15 08:35:39 +00:00
Gonzalo Paniagua Javier 047c999e9e Reverted last patch. It breaks configuration reading
svn path=/trunk/mcs/; revision=12017
2003-02-27 01:20:59 +00:00
Atsushi Eno b4d47f5448 2003-02-27 Atsushi Enomoto <[email protected]>
* XmlDocument.cs: modified Load().
	  Uri.Parse might not allow non-uri string.
	* XmlInputStream.cs: patch by Gonzalo (CanSeek).
	  added some constructors for convenience.
	* XmlTextReader.cs: modified some constructors.

svn path=/trunk/mcs/; revision=12005
2003-02-26 19:11:46 +00:00
Atsushi Eno 615abae8f1 2003-02-16 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : added (also contains internal XmlStreamReader).
	* XmlDocument.cs : Load () now can specify URL using XmlUrlResolver,
		and can read non-UTF-8 stream.
	* XmlTextReader.cs : related to above stream fix.
	* XmlUrlResolver.cs : implemented GetEntity ().

svn path=/trunk/mcs/; revision=11611
2003-02-16 07:25:43 +00:00