Commit Graph
938 Commits
Author SHA1 Message Date
Atsushi Eno 103fb0642d 2004-12-15 Atsushi Enomoto <[email protected]>
* xsdtest.cs : added --v2 option that uses XmlReader.Create()
	  instead of XmlValidatingReader.

	* XmlFilterReader.cs : don't expect XmlReaderSettings of its source.

	* XmlSchemaValidatingReader.cs : xsi:* attributes are now handled via
	  XmlSchemaValidator.ValidateElement().
	  Removed some obsolete overrides.

	* XmlReader.cs :
	  Create() should assure NameTable!=null on creating XmlTextReader.
	  Now use XmlSchemaValidatingReader for all xsd validation.
	* XmlTextReader2.cs :
	  Don't use input reader's Settings. It is null.
	* XmlReaderSettings.cs : added XmlResolver.

	* XmlSchemaSet.cs : set default resolver. Clear components before
	  recompilation.
	* XmlSchemaValidator.cs :
	  SourceUri is System.Uri.
	  GetUnspecifiedDefaultAttributes() is allowed only when it is inside
	  start tag.
	  Added AddSchema().
	  Added duplicate attribute check.
	  Added ValidateElement() that takes xsi:* parameters.
	  (http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackId=7fc38ea1-c306-4fb7-8631-0e174b0ff3c6)
	  HandleXsiNil() now just takes string parameter.



svn path=/trunk/mcs/; revision=37782
2004-12-15 13:58:32 +00:00
Atsushi Eno 2ff40096cb 2004-12-14 Atsushi Enomoto <[email protected]>
* System.Xml.dll.sources : added XmlSchemaValidatingReader.

	* XmlSchemaValidatingReader.cs : new file; another XmlReader 
	  implementation that handles XSD validation. It is an reference
	  application for XmlSchemaValidator.
	* XsdValidatingReader.cs : Use readerLineInfo for IXmlLineInfo.

	* XmlReaderSettings.cs : XsdValidate and DtdValidate are now
	  ValidationType.
	* XmlReader.cs : In Create(), use XmlSchemaValidatingReader for xsd
	  validation.

	* XmlSchemaValidator.cs : implemented basic validation feature.



svn path=/trunk/mcs/; revision=37739
2004-12-14 12:09:23 +00:00
Zoltan Varga c196ef2c3f 2004-12-12 Zoltan Varga <[email protected]>
* XmlTextReader.cs: Work around a compiler bug in csc 2.0 beta 1.

svn path=/trunk/mcs/; revision=37668
2004-12-12 21:14:29 +00:00
Atsushi Eno 8961d21eeb 2004-12-09 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs : implemented lightweight XmlSchema generator.


svn path=/trunk/mcs/; revision=37469
2004-12-09 08:50:35 +00:00
Atsushi Eno bf30c35790 2004-12-08 Atsushi Enomoto <[email protected]>
* XsdValidatingReader.cs : making smarter relationship between
	  XmlValidatingReader. Added ValidationEventHandler and ValidationType.
	  nonDefaultAttributeCount was extraneous.
	  Added 'checkIdentity' (i.e. !IgnoreIdentityConstraints).
	  DefaultAttributesCache property did make little sense, so just
	  reverted to ArrayList field.

	* XmlValidatingReader.cs : making smarter relationship between
	  XsdValidatingReader.


svn path=/trunk/mcs/; revision=37429
2004-12-08 22:12:44 +00:00
Atsushi Eno 9a2a6c86f3 2004-12-08 Atsushi Enomoto <[email protected]>
* System.Xml.dll.sources : added XmlSchemaValidator.cs,
	  XmlValueGetter.cs and XmlSchemaValidationFlags.cs.

	* XmlException.cs : added SecurityPermissionAttributes.
	* XmlReaderSettings.cs,
	  XmlReader.cs : added ValidationFlags and removed obsolete ones.

	* XmlValueGetter.cs,
	  XmlSchemaValidationFlags.cs,
	  XmlSchemaValidator.cs : added.
	* XmlSchemaSet.cs : XmlResolver is now internally gettable.


svn path=/trunk/mcs/; revision=37398
2004-12-08 17:14:21 +00:00
Atsushi Eno 1b3a8330dd 2004-12-06 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : WriteQualifiedNameInternal() should consider the case
	  ns is null, and don't lookup prefix for empty namespace.



svn path=/trunk/mcs/; revision=37185
2004-12-06 11:15:11 +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 c074d29c67 2004-11-30 Atsushi Enomoto <[email protected]>
* DTDReader.cs : Consideration on parameter entity was missing for 
	  attribute default value. Fixed bug #70008.



svn path=/trunk/mcs/; revision=36816
2004-11-30 06:19:52 +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 5c69bd82bf 2004-11-25 Atsushi Enomoto <[email protected]>
* XmlQualifiedNameTable.cs : oops, it was not implemented.



svn path=/trunk/mcs/; revision=36516
2004-11-25 05:03:12 +00:00
Atsushi Eno 3adcf9dff4 2004-11-24 Atsushi Enomoto <[email protected]>
* XmlQualifiedName.cs : in 2.0 it is [Serializable].
	* XmlTextReader.cs : removed unused local variable.
	* XmlTextWriter.cs : Improved some exception messages.
	  moved some private fields into #if NET_2_0.
	* XmlValidatingReader.cs : rename specifiedResolver to
	  resolverSpecified and use it in internal get_Resolver().
	  Added [Obsolete] for ReadTypedValue() whose base is obsoleted.



svn path=/trunk/mcs/; revision=36465
2004-11-24 10:43:19 +00:00
Atsushi Eno 7a32a34e50 2004-11-22 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Now attribute normalization is handled on Read(),
	  not on get_Value. This caused a problem when we use
	  XmlValidatingReader that value is not always normalized expectedly.



svn path=/trunk/mcs/; revision=36361
2004-11-22 01:39:57 +00:00
Atsushi Eno 2a010f92e5 2004-11-22 Atsushi Enomoto <[email protected]>
* XmlReader.cs : removed old ReadValueAsXXX() and added new
	  ReadContentAsXXX() and ReadElementContentAsXXX().
	* XmlTextReader.cs : removed old ReadValueAsXXX() (no overrides now).
	* XmlTextWriter.cs : added indentation on Comment nodes.
	* XmlDateTimeSerializationMode.cs : updated.
	* XmlResolver.cs : added 2.0 NameTable field.
	* ValidationType.cs : added ObsoleteAttributes on some members.



svn path=/trunk/mcs/; revision=36358
2004-11-22 01:19:15 +00:00
Atsushi Eno f3ed69141a 2004-11-18 Atsushi Enomoto <[email protected]>
* XmlParserContext.cs : the fix was not checked in :(



svn path=/trunk/mcs/; revision=36259
2004-11-18 11:35:13 +00:00
Atsushi Eno 1d3cbfe8b8 2004-11-17 Atsushi Enomoto <[email protected]>
* System.Xml.dll.sources, System.Xml.Query/XQueryConvert.cs,
	  System.Xml/XQueryConvert.cs : moved XQueryConvert.cs.


svn path=/trunk/mcs/; revision=36213
2004-11-17 13:01:36 +00:00
Atsushi Eno 866dca5fdd 2004-11-14 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : after WriteAttributes(), argument XmlReader must
	  move to element. This fixes bug #69350.


svn path=/trunk/mcs/; revision=36102
2004-11-14 05:39:35 +00:00
Atsushi Eno 481f6736d8 2004-11-10 Atsushi Enomoto <[email protected]>
* XmlParserContext.cs : PushScope() was accessing list out of range.

svn path=/trunk/mcs/; revision=35956
2004-11-10 08:21:50 +00:00
Atsushi Eno 285666384c 2004-11-09 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs, XmlTextReader.cs :
	  needed more changes wrt XmlException.

svn path=/trunk/mcs/; revision=35871
2004-11-09 02:38:30 +00:00
Atsushi Eno f6a6ca4b93 2004-11-08 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs,
	  DTDReader.cs,
	  XmlReader.cs,
	  XmlTextReader.cs,
	  XmlException.cs :

	  Added support for 2.0 XmlException.SourceUri property. Improved
	  exception handling to contain BaseURI everywhere in the parser.

svn path=/trunk/mcs/; revision=35820
2004-11-08 09:18:29 +00:00
Atsushi Eno 70b42d2cef 2004-11-08 Atsushi Enomoto <[email protected]>
* XmlTextReader2.cs : added. It is used to serve public API, plus
	  entity handling support.

	* DTDObjectModel.cs,
	  DTDValidatingReader.cs,
	  XmlDocumentType.cs,
	  XmlParserContext.cs,
	  XmlTextReader.cs :
	  Implemented XmlTextReader.EntityHandling and ResolveEntity(). To
	  implement them, XmlTextReader in 2.0 itself is in XmlTextReader2.cs
	  and XmlTextReader.cs contains Mono.Xml2.XmlTextReader which is the
	  same as 1.x XmlTextReader. XmlTextReader2 switches entity reader and
	  source reader, and never handles tokenization.
	  The reason for "Mono.Xml2" is to avoid large changes in constructor.f

svn path=/trunk/mcs/; revision=35812
2004-11-08 06:49:47 +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 25683590a7 2004-11-05 Atsushi Enomoto <[email protected]>
* XmlDocumentNavigator.cs : create rarely-used ArrayList later. This
	  significantly improves XmlDocument-based XPath performance.

svn path=/trunk/mcs/; revision=35760
2004-11-06 05:34:39 +00:00
Atsushi Eno 046985f354 2004-11-04 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Manually expanded some of AppendValueChar() and
	  XmlChar.IsWhitespace() which are on critical points on performance
	  (marked as FIXME, but it depends on JIT).

svn path=/trunk/mcs/; revision=35624
2004-11-04 06:39:30 +00:00
Atsushi Eno 7e7b4c2d28 2004-11-04 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Search xml:* attributes more efficiently.

svn path=/trunk/mcs/; revision=35623
2004-11-04 05:43:39 +00:00
Atsushi Eno f2e7a5a42f 2004-11-04 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Reduced NameTable.Add() for prefixed names. First,
	  ReadName() now returns atomized LocalName and Prefix. Second, to
	  avoid extraneous split, SetProperties() now takes prefix and
	  localName that might be given from ReadName(). Third, removed
	  FillNames(). This optimizes "namespace-aware and prefixed document"
	  parsing 10-20% faster.

svn path=/trunk/mcs/; revision=35622
2004-11-04 04:32:34 +00:00
Atsushi Eno 417e14b18c 2004-11-03 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs :
	  With related to AddNamespace(), there was extra string.StartsWith()
	  calls. Now AttributeTokenInfo.FillNames() is splitted into
	  FillPrefixAndXmlns() and FillNamespace(), and AddNamespace() is done
	  at FillPrefixAndXmlns().

svn path=/trunk/mcs/; revision=35601
2004-11-03 14:37:55 +00:00
Atsushi Eno 95708afb87 2004-11-03 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs :
	  Reduces LookupNamespace() call in FillNames(). This improves 6-7%
	  speedup in some scenario.
	  Code refactory; Removed unused code. AddAttribute() is used only for
	  DTD, so renamed to AddDtdAttribute(). For PUBLIC and SYSTEM ids,
	  FillNames() is not required. Two SetProperties() are ambiguous, so
	  renamed one (that takes TokenInfo) as SetTokenProperties().

svn path=/trunk/mcs/; revision=35598
2004-11-03 13:12:07 +00:00
Atsushi Eno cf68eface4 2004-11-03 Atsushi Enomoto <[email protected]>
* XmlParserContext.cs : rewrote; especially to avoid XmlSpace boxing.

svn path=/trunk/mcs/; revision=35592
2004-11-03 11:49:51 +00:00
Atsushi Eno cd7ead0886 2004-11-03 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : LookupNamespace() don't have to be called in
	  ReadStartTag() to check prefix, since NamespaceURI is filled in
	  FillNames(). 10% performance up by avoiding this extra check.

svn path=/trunk/mcs/; revision=35590
2004-11-03 10:05:51 +00:00
Atsushi Eno c565d41d46 2004-10-29 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : fixed incorrect recursion between
	  indexer and GetAttribute().

svn path=/trunk/mcs/; revision=35431
2004-10-29 06:56:59 +00:00
Atsushi Eno ff1ec3a518 2004-10-29 Atsushi Enomoto <[email protected]>
* DTDReader.cs, DTDValidatingReader.cs, XmlTextReader.cs :
	  When XmlTextReader is created with NodeType Element or Attribute,
	  skip possible text declaration (that might be used for resolving
	  entities) that specifies text encoding. With this fix, bug #61274
	  must be regarded as fixed.

svn path=/trunk/mcs/; revision=35428
2004-10-29 04:48:04 +00:00
Atsushi Eno 83b1983ad7 2004-10-29 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : Reimplemented ResolveEntity(). It does not use
	  XmlTextReader trick anymore. XmlNodeReader itself it used instead.

svn path=/trunk/mcs/; revision=35427
2004-10-29 04:26:02 +00:00
Atsushi Eno 1522105d52 2004-10-29 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : for NET_1_0 ReadInnerXml(), just use
	  XmlReader.ReadInnerXmlInternal(). It should work fine.
	  Ditto for ReadOuterXml().

svn path=/trunk/mcs/; revision=35423
2004-10-29 03:20:30 +00:00
Atsushi Eno 8ebc111e08 2004-10-29 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : removed unused/unreachable code. Simplify
	  namespace lookup.

svn path=/trunk/mcs/; revision=35419
2004-10-29 02:51:37 +00:00
Atsushi Eno b248901394 2004-10-29 Atsushi Enomoto <[email protected]>
* XmlDocument.cs, XmlNodeReader.cs, XmlTextReader.cs,
	  XmlValidatingReader.cs : Those readers could just implement internal
	  interface IHasXmlParserContext.
	* XmlTextReader.cs, XmlValidatingReader.cs : this[] disappeared in 2.0.
	  (XmlReader has them as virtual.)
	* XmlReader.cs : ReadAsObject() disappeared.
	* XmlWriter.cs : WriteFromObject() disappeared.

svn path=/trunk/mcs/; revision=35417
2004-10-29 01:20:48 +00:00
Atsushi Eno 0018d2cc28 2004-10-29 Atsushi Enomoto <[email protected]>
* XmlDocumentNavigator.cs : GetNode() should consider namespace nodes.
	* XmlNode.cs : dustclean.

svn path=/trunk/mcs/; revision=35415
2004-10-29 01:13:03 +00:00
Atsushi Eno 49f8de6fd4 ... should have been removed in the last commit.
svn path=/trunk/mcs/; revision=35412
2004-10-28 20:26:16 +00:00
Atsushi Eno be71f854d6 2004-10-28 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : use XPathEditableDocument again.
	* XmlNode.cs : To be compatible with XPathEditableDocument, it should
	  not cast XPathNavigator to XmlDocumentNavigator but to IHasXmlNode.

svn path=/trunk/mcs/; revision=35389
2004-10-28 06:27:46 +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 e406a02c07 2004-10-28 Atsushi Enomoto <[email protected]>
* IXmlDataEvidence.cs : disappeared.
	* XmlConvertDateTimeSerializationMode.cs : incorrect filename. removed.
	* XmlDateTimeSerializationMode.cs : added
	* NewLineHandling.cs : added
	* IXmlNamespaceResolver.cs, XmlNamespaceManager.cs :
	  now 'atomizedNames' is obsolete.
	* XmlReaderSettings.cs, XmlWriterSettings.cs :
	  Should not be sealed. Should not be ICloneable.

svn path=/trunk/mcs/; revision=35377
2004-10-28 02:41:01 +00:00
Atsushi Eno 65c290bee7 2004-10-28 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : XPathEditableDocument looks broken. Just reverted
	  to fix 2.0 corcompare.

svn path=/trunk/mcs/; revision=35375
2004-10-28 01:26:49 +00:00
Atsushi Eno 58ae10f587 2004-10-26 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Don't create attribute Value string on Read()
	  (i.e. create string when get_Value() is invoked.) This optimizes
	  some kind of XmlTextReader usage significantly such as Skip().

svn path=/trunk/mcs/; revision=35338
2004-10-26 22:16:02 +00:00
Atsushi Eno e2de3f9aa9 2004-10-22 Atsushi Enomoto <[email protected]>
* XmlConvertDateTimeSerializationMode.cs : added.
	* XmlConvertDateTimeOption.cs : removed.

svn path=/trunk/mcs/; revision=35277
2004-10-22 22:40:03 +00:00
Atsushi Eno 917d013209 2004-10-22 Atsushi Enomoto <[email protected]>
* XmlDocument.cs :
	  For net_2_0, CreateNavigator() returns editable XPathNavigator.
	* XmlReader.cs, XmlTextReader.cs, XmlValidatingReader.cs :
	  They do not implement IXmlDataEvidence anymore.

svn path=/trunk/mcs/; revision=35268
2004-10-22 19:57:04 +00:00
Atsushi Eno 073481b554 2004-10-18 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs :
	  Fixed CheckCharacters setter that always set false.
	  CheckCharacters check is also required for ReadText(). This fixes
	  bug #68449.

svn path=/trunk/mcs/; revision=35085
2004-10-18 15:35:38 +00:00
Atsushi Eno b9c19e3678 2004-10-15 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Inside DTD, '<' character inside XML comment
	  is regatded as invalid. This fixes bug #68410. (Error message was
	  also not correct.)

svn path=/trunk/mcs/; revision=35045
2004-10-15 22:04:38 +00:00
Atsushi Eno eb0e3a755b 2004-10-14 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : CreateTextWriter() is private.

svn path=/trunk/mcs/; revision=35000
2004-10-14 15:30:41 +00:00
Atsushi Eno 0642009b57 2004-10-09 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : LookupPrefix() was only after 2.0.

svn path=/trunk/mcs/; revision=34838
2004-10-09 19:25:11 +00:00
Atsushi Eno 95c1afc699 2004-10-08 Atsushi Enomoto <[email protected]>
* XmlNamespaceManager.cs : GetNamespacesInScope() caused
	  IndexOutOfRangeException (miscounted indexes).

svn path=/trunk/mcs/; revision=34827
2004-10-08 19:50:19 +00:00