Commit Graph
53 Commits
Author SHA1 Message Date
Martin Baulig 7d170f400d Sync parameter names with .NET. 2012-06-03 04:02:28 +02:00
Atsushi Eno 0fc59854a9 2009-01-30 Atsushi Enomoto <[email protected]>
* XmlSchemaValidatingReader.cs : implement IHasXmlParserContext to
	  pass possible DTD information.

	* DTDValidatingReader2.cs, EntityResolvingXmlReader.cs : simplify
	  parsercontext provision.
	* XmlValidatingReader.cs : expand parser context provision to
	  non-dtdvalidating readers.


svn path=/trunk/mcs/; revision=125053
2009-01-30 03:17:39 +00:00
Atsushi Eno 1d3440fc5d sanitizing MonoTODOs.
svn path=/trunk/mcs/; revision=67899
2006-11-15 11:31:25 +00:00
Atsushi Eno 6331ad5c79 2006-07-26 Atsushi Enomoto <[email protected]>
Refactoring compilation to make Compile() portable to
	XmlSchemaSet.Compile() and fix multi-schema bugs (not done yet)

	* XmlSchema.cs : 
	  Removed "root schema" concept from Compile().
	  Since nested inclusion does not result in an error, the role of
	  schemaLocationStack is identical to handledUris, thus removed it.
	  The handledUris does not have to be a field.
	  Moved NamedIdentities and IDCollections to XmlSchemaSet.
	  Renamed a Compile() which is called from XmlSchemaCollection and
	  XmlSchemaSet as CompileSubset(). Renamed private Compile() as
	  DoCompile().
	  public Compile() now internally creates a new XmlSchemaSet and
	  compiles the set.
	* XmlSchemaCollection.cs : now it hooks its schemaSet's validation
	  event handler and thus XmlSchemaSet does not need to check this
	  collection's event handler by itself.
	  XmlSchema.Compile() -> XmlSchema.CompileSubset().
	* XmlSchemaSet.cs :
	  Removed SchemaCollection which became unneccessary.
	  Added NamedIdentities and IDCollection.
	  XmlSchema.Compile() -> XmlSchema.CompileSubset().
	* XmlSchemaAttributeGroupRef.cs, XmlSchemaXPath.cs
	  XmlSchemaSimpleTypeList.cs, XmlSchemaComplexContentRestriction.cs,
	  XmlSchemaGroup.cs, XmlSchemaComplexContentExtension.cs,
	  XmlSchemaSequence.cs, XmlSchemaSimpleContentRestriction.cs,
	  XmlSchemaSimpleContentExtension.cs, XmlSchemaAny.cs,
	  XmlSchemaElement.cs, XmlSchemaNotation.cs, XmlSchemaAll.cs,
	  XmlSchemaComplexType.cs, XmlSchemaAnnotation.cs,
	  XmlSchemaAttributeGroup.cs, XmlSchemaSimpleTypeRestriction.cs,
	  XmlSchemaSimpleContent.cs, XmlSchemaGroupRef.cs,
	  XmlSchemaChoice.cs, XmlSchemaSimpleType.cs,
	  XmlSchemaIdentityConstraint.cs, XmlSchemaSimpleTypeUnion.cs,
	  XmlSchemaAnyAttribute.cs, XmlSchemaComplexContent.cs,
	  XmlSchemaAttribute.cs, XmlSchemaObject.cs :
	  removed XmlSchemaObject.IsCompiled(). Check compilation state by
	  comparing compilation ID directly.

	* XmlReader.cs :
	  For DTD validator, call to SetSchemas() makes no sense.
	* XmlValidatingReader.cs : now it internally holds old
	  XmlSchemaCollection instead of new XmlSchemaSet, to make
	  XmlSchemaSet.SchemaCollection unneccessary.
	  Removed SetSchemas() since it is now extraneous because of the
	  XmlReaderChange above.


svn path=/trunk/mcs/; revision=62988
2006-07-26 10:13:56 +00:00
Atsushi Eno 23a31be5d3 2006-02-20 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : reducing layered ReadState invocation
	  results in 10% speed up.


svn path=/trunk/mcs/; revision=57064
2006-02-20 13:02:16 +00:00
Atsushi Eno e2440ce8e1 2006-01-30 Atsushi Enomoto <[email protected]>
* XmlNodeReader2.cs XmlException.cs XmlReader.cs XmlTextReader.cs
	  XmlWriter.cs XmlTextWriter.cs XmlValidatingReader.cs
	  XmlNodeReaderImpl.cs DTDValidatingReader.cs XmlSecureResolver.cs:
	  cleaning up obsolete NET_1_0 code.


svn path=/trunk/mcs/; revision=56239
2006-01-30 08:10:05 +00:00
Atsushi Eno 12b7f166b6 2006-01-06 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : In ReadTypedValue(), treat Whitespace
	  nodes as target string nodes as well as other text nodes.

	* XsdValidatingReader.cs :
	  Don't use normalized string as input to AssessStringValid(). It 
	  incorrectly invalidates strings against simple types with length-
	  related facets.
	  Now that we don't ignore whitespaces, we need to explicitly allow
	  pure whitespace texts in ElementOnly/Empty model.

	* XmlSchemaSimpleTypeRestriction.cs : maxLength and minLength were
	  likely to be ignored in ValidateNonListValueWithFacets().
	* XmlSchemaValidator.cs : Don't use normalized string value as the
	  input to AssessStringValid().

	* XsdValidatingReaderTests.cs : test for ReadTypeValue() that it
	  does not ignore whitespace nodes, and it does not normalize string
	  incorrectly.


svn path=/trunk/mcs/; revision=55129
2006-01-06 04:47:46 +00:00
Atsushi Eno 2b56366922 2006-01-06 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : ReadTypedValue() was not working with
	  non-XmlSchemaDatatype types.

	* XsdValidatingReaderTests.cs : test for ReadTypeValue() with simple
	  type restriction.


svn path=/trunk/mcs/; revision=55127
2006-01-06 03:36:13 +00:00
Atsushi Eno 0dbee9dd3a 2005-11-09 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : added CanReadBinaryContent.
	* XmlTextReader.cs, XmlTextReader2.cs : GetNamespacesInScope() are
	  now both public and private (i.e. hush IsVirtual).
	* XmlWriterSettings.cs, XmlWriter.cs, XmlTextWriter.cs :
	  NormalizeNewLines vanished.

	* XmlWriterSettingsTests.cs : NormalizeNewLines does not exist anymore


svn path=/trunk/mcs/; revision=52876
2005-11-10 18:12:16 +00:00
Atsushi Eno a7a4be34df 2005-11-07 Atsushi Enomoto <[email protected]>
* XsdValidatingReader.cs : XmlReader.ReadTypedValue() does not exist 
	  anymore, so it is not override.

	* XmlNamespaceManager.cs : NameTable is virtual in 2.0 RTM.
	* XmlReader.cs : IsEmptyElement is reverted to be abstract in 2.0 RTM.
	  ReadTypedValue() is removed.
	* XmlValidatingReader.cs : ReadTypedValue() is not virtual now.
	* XmlWriter.cs : Settings is virtual.

	* XPathNodeIterator.cs : added [DebuggerDisplay]. pretty useless tho.
	* XPathNavigator.cs : [DebuggerDisplay] as well.
	  SelectSingleNode() and AppendChildElement() are now virtual.


svn path=/trunk/mcs/; revision=52637
2005-11-07 08:48:22 +00:00
Atsushi Eno 8b5cdb6619 2005-09-21 Atsushi Enomoto <[email protected]>
* Makefile : shut down CS0642 noise.
	* System.Xml.dll.sources : added XmlOutputMethod.

	* XmlOutputMethod.cs : new file.
	* XmlWriter.cs, XmlValidatingReader.cs, XmlReaderSettings.cs,
	  XmlUrlResolver.cs, XmlWriterSettings.cs :
	  more NET_2_0 updates.


svn path=/trunk/mcs/; revision=50353
2005-09-21 03:35:52 +00:00
Sebastien Pouliot a17dea8630 2005-08-31 Sebastien Pouliot <[email protected]>
* XmlDocument.cs: Added an InheritanceDemand for Unrestricted on 
	CreateDocumentType and ReadNode methods.
	* XmlException.cs: Added a Demand for SerializationFormatter on 
	GetObjectData method.
	* XmlResolver.cs: Added an InheritanceDemand for Unrestricted on 
	ResolveUri method.
	* XmlSecureResolver.cs: Fixed exception when creating evidences with 
	an empty URL in CreateEvidenceForUrl method. Only call ResolvePolicy 
	and PermitOnly if the security manager is enabled.
	* XmlTextReader.cs: Added an InheritanceDemand for Unrestricted on the
	class.
	* XmlTextReader2.cs: Added an InheritanceDemand for Unrestricted on 
	the class.
	* XmlValidatingReader.cs: Added an InheritanceDemand for Unrestricted 
	on the class.


svn path=/trunk/mcs/; revision=49179
2005-08-31 13:12:47 +00:00
Gert Driesen b6157808b4 * XmlSchemaInference.cs: Is sealed in Beta 2.
* XmlSchemaInfo.cs: Added ContentType property.
* XmlSchemaObjectEnumerator.cs: No longer sealed in Beta 2.
* XmlSchemaSet.cs: No longer sealed in Beta 2. XmlResolver property
is now CLSCompliant.
* XmlConvert.cs: Renamed RoundTripKind to RoundtripKind.
* XmlDateTimeSerializationMode.cs: Renamed RoundTripKind to RoundtripKind 
to match .NET 2.0 Beta 2.
* XmlNodeReader2.cs: GetNamespacesInScope returns generic IDictionary
in .NET 2.0 Beta 2, and is explicit interface implementation.
* XmlTextReader.cs: GetNamespacesInScope returns generic IDictionary
in .NET 2.0 Beta 2.
* XmlTextReader2.cs: GetNamespacesInScope returns generic IDictionary
in .NET 2.0 Beta 2.
* XmlValidatingReader.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* IXmlNamespaceResolver.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* XmlNamespaceManager.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* XmlNodeReaderImpl.cs: GetNamespacesInScope returns generic IDictionary in 
.NET 2.0 Beta 2.
* DTDValidatingReader.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* XsltArgumentList.cs: No longer sealed in .NET 2.0.
* XsltException.cs: Message override is back in .NET 2.0 Beta 2.
* XmlMapping.cs: API compatibility fixes. Ctor is not protected in .NET 1.1. 
SetKey is not obsolete in .NET 2.0 Beta 2.
* XPathNavigator.cs: GetNamespacesInScope returns generic IDictionary
in .NET 2.0 Beta 2.
* XsdValidationReader.cs: GetNamespacesInScope returns generic IDictionary 
in .NET 2.0 Beta 2.
* XmlSchemaValidatingReader.cs: GetNamespacesInScope returns generic
IDictionary in .NET 2.0 Beta 2.
* SubtreeXmlReader.cs: GetNamespacesInScope now returns generic IDictionary.

svn path=/trunk/mcs/; revision=47974
2005-08-03 17:39:08 +00:00
Atsushi Eno 62460b3c62 2005-06-27 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : added Create(XmlWriter).
	* XmlValidatingReader.cs : added Read*AsBase64/BinHex().
	* XmlReaderSettings.cs : added obsolete annoyances to hush corcompare.


svn path=/trunk/mcs/; revision=46537
2005-06-27 08:33:39 +00:00
Atsushi Eno 93261fb2a4 2005-06-17 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : LookupNamespace() was trying to access to 
	  null reference to validatingReader.
	* DTDValidatingReader.cs : Fixed default xmlns* attribute handling.
	  It used to be valid only at the declaring element.

	* XmlValidatingReaderTests.cs : added DefaultXmlnsAttributeLookup().


svn path=/trunk/mcs/; revision=46120
2005-06-17 07:22:25 +00:00
Atsushi Eno 59f1697a06 2004-05-05 Atsushi Enomoto <[email protected]>
* System.Xml.dll.sources : XPathAtomicValue.cs -> XmlAtomicValue.cs.

	* XmlAtomicValue.cs : moved from XPathAtomicValue, removed some stuff.

	* SubtreeXmlReader.cs :
	  removed atomizedName related 2.0 member (deprecated).

	* XPathAtomicValue.cs :
	  it is now XmlAtomicValue and in sys.xml.schema.
	* XPathNavigator.cs, Expression.cs :
	  removed atomizedName related 2.0 members (deprecated).

	* XsdValidatingReader.cs :
	  removed atomicName related 2.0 members (deprecated in beta2).

	* XmlNodeReader2.cs, XmlTextReader2.cs, XmlValidatingReader.cs,
	  XmlNamespaceManager.cs, IXmlNamespaceResolver.cs,
	  DTDValidatingReader.cs : Removed most of "atomizedName" related
	  stuff that are obsoleted in 2.0 beta2.
	* XQueryConvert.cs : XPathAtomicValue -> XmlAtomicValue.

	* XmlNamespaceManagerTests.cs : removed atomizedName related tests.


svn path=/trunk/mcs/; revision=44083
2005-05-05 14:14:57 +00:00
Atsushi Eno 76a1671b91 2005-03-22 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : create schema set on demand.


svn path=/trunk/mcs/; revision=42119
2005-03-22 15:46:22 +00:00
Atsushi Eno 96e205f1b3 2004-12-26 Atsushi Enomoto <[email protected]>
* XmlReader.cs : ReadElementContentAsBinHex() was calling ..AsBase64().
	* XmlValidatingReader.cs : In set_EntityHandling(), set that property
	  of DTDValidatingReader.
	* XmlNodeReader2.cs,
	  XmlNodeReaderImpl.cs : added simplified implementation that splits
	  entity handling and anything else.
	* XQueryConvert.cs : implemented ShouldCheckValueFacets().
	  Use Convert class instead of simple casts (check range).
	* XmlReaderSettings.cs : added SetSchemas() for XPathNavigator.



svn path=/trunk/mcs/; revision=38088
2004-12-26 16:39:07 +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 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 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 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 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
Gert Driesen 55e02abcc4 * XmlValidatingReader.cs: Added deprecation message.
svn path=/trunk/mcs/; revision=34095
2004-09-20 18:21:55 +00:00
Atsushi Eno 001f24a919 2004-08-20 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Fixed EOF not to return true when it is just
	  closed. Element and EndElement location is now adjusted to be the
	  same as MS.NET does. This fixes bug #63505 and #63507.
	  ResetState() now throws InvalidOperationException() as MS.NET does.

	* WriteState.cs : added missing 2_0 enumeration.
	* XmlReader.cs : ReadTypedValue() is virtual.
	* XmlValidatingReader.cs : ReadTypedValue() is override under 2_0.

svn path=/trunk/mcs/; revision=32558
2004-08-20 03:56:05 +00:00
Atsushi Eno 6dd3946949 2004-08-10 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : Replaced XmlSchemaCollection with
	  XmlSchemaSet. Added Settings property override

svn path=/trunk/mcs/; revision=32145
2004-08-10 14:27:57 +00:00
Atsushi Eno 63ef683fdf 2004-08-03 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs,
	  XmlValidatingReader.cs : implemented IXmlNamespaceResolver.
	* XmlNamespaceManager.cs,
	  XmlNodeReader.cs : implemented GetNamespacesInScope().

svn path=/trunk/mcs/; revision=31795
2004-08-03 13:20:17 +00:00
Atsushi Eno 243ec2f2a7 2004-07-21 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : added internal ToBinHexString() (BTW according to
	  MSDN documentation it should be public).
	* XmlReader.cs : fixed one incorrect Create() overload. Added
	  LookupNamespace (string, bool) (public for 2.0, internal for 1.x).
	* XmlTextReader.cs : Mostly implemented IXmlNamespaceResolver
	  interface. Fixed HasLineInfo() access modifier on 2.0.
	* XmlNodeReader.cs : Mostly implemented IXmlNamespaceResolver
	  interface. Wrote common namespace node lookup method and rewrote
	  existing LookupNamespace().
	* XmlValidatingReader.cs : Fixed 2.0 IXmlLineInfo members' signatures.

svn path=/trunk/mcs/; revision=31333
2004-07-21 14:44:44 +00:00
Atsushi Eno 3733f8ba87 2004-07-13 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : Added Create() stubs.
	* XmlWriterSettings.cs : Added missing property setters.
	* XmlValidatingReader.cs : added internal schemas setter.
	* XmlTextReader.cs : added internal XmlReaderSettings property setter.
	* XmlReader.cs :  Halfly implemented Create().
	* DTDValidatingReader.cs : author information was missing.

svn path=/trunk/mcs/; revision=31078
2004-07-13 12:36:32 +00:00
Atsushi Eno 414705f5ef 2004-07-09 Atsushi Enomoto <[email protected]>
* IXmlNamespaceResolver.cs :
	  Fixed return value of GetNamespacesInScope().
	* IXmlDataEvidence.cs,
	  XmlReader.cs,
	  XmlTextReader.cs,
	  XmlValidatingReader.cs : fixed Evidence (it is not array anymore).
	* XmlReader.cs :
	  Implemented virtual indexers, QuoteChar, and Dispose() (2.0 stuff).
	* XmlNodeReader.cs,
	  In net_2_0, indexers vanished from XmlNodeReader.
	  In net_2_0, overriden QuoteChar vanished.
	* XmlReaderSettings.cs : set_NameTable is missing.
	* XmlTextReader.cs : Implemented ProhibitDtd.

svn path=/trunk/mcs/; revision=30929
2004-07-09 13:51:23 +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 c90e7f11e6 2004-05-13 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : explicitly mark as MonoTODO for XDR (not
	  supported).

svn path=/trunk/mcs/; revision=27221
2004-05-13 05:00:37 +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 5dc2265c13 2004-01-26 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs :
	  - DTDNode's BaseURI should not always refer to that of DTD's.
	  - Use absolute URI's .ToString() instead of AbsolutePath.
	* DTDReader.cs : Throw XmlException for illegal character references.
	* DTDValidatingReader.cs :
	  - Share XmlResolver when the actual reader is XmlTextReader.
	    (MS's XmlValidatingReader and XmlTextReader do this.)
	  - Added its own EntityHandling property.
	* XmlValidatingReader.cs : Share XmlResolver with XmlTextReader.
	* XmlReader.cs,
	  XmlTextReader.cs : Added new NET_1_2 members.
	* XmlElement.cs : Removed extra lines (caused by XmlTextWriter bugs).
	* XmlEntityReference.cs : Forgot to add, the real fix by Boris.

svn path=/trunk/mcs/; revision=22509
2004-01-26 18:25:39 +00:00
Atsushi Eno 6ed2623468 2004-01-13 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : Throw exception only in case of errors.
	  Added NET_1_2 Evidences property.

svn path=/trunk/mcs/; revision=22012
2004-01-13 09:07:20 +00:00
Atsushi Eno 9a5b6800ec 2003-10-25 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs : Now it handles whitespace entity as
	  significant.
	* XmlConvert.cs : As to NIST testcases, exponential support on single
	  and double floating point numbers.
	* XmlValidatingReader.cs : If it IsDefault, then line number and line
	  position returns 0.

svn path=/trunk/mcs/; revision=19384
2003-10-25 15:52:43 +00:00
Atsushi Eno b8058c932d 2003-10-19 Atsushi Enomoto <[email protected]>
* XmlAttributeCollection.cs : Fixed synchronization stuff.
	* XmlConvert.cs : Added two FromBinHexString() methods.
	* XmlTextReader.cs : Modified to use one of the above method.
	* XmlValidatingReader.cs : XsdValidatingReader.XmlResolver will be
	  disabled (in the next commit), so resolver won' be set to it.
	  Attempt to validate against XDR now throws NotSupportedException.

svn path=/trunk/mcs/; revision=19191
2003-10-19 13:56:55 +00:00
Atsushi Eno c7fa9e9505 2003-10-19 Atsushi Enomoto <[email protected]>
* XmlNode.cs : GetPrefixOfNamespace() also contained a bug similar to
	  GetNamespaceOfPrefix() fixed at 2003-10-13.
	* XmlTextReader.cs : ReadBase64() should keep incomplete base64 block
	  which remained by previous call of this method.
	* XmlUrlResolver.cs : Added assertion for file Uri path's absoluteness.
	* XmlValidatingReader.cs : Notice about intention of XDR won't be
	  supported (at least in Mono 1.0).

svn path=/trunk/mcs/; revision=19187
2003-10-19 04:47:46 +00:00
Atsushi Eno ff5c9e2293 2003-09-30 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs : Simplified to use
	  XmlSchemaUtil.GetParserContext().
	* XmlValidatingReader.cs : ValidationType.Auto should always use
	  XsdValidatingReader because xsi:schemaLocation might be used.

svn path=/trunk/mcs/; revision=18441
2003-09-30 19:12:06 +00:00
Atsushi Eno 4b0fc2dec7 2003-08-24 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : Implemented SchemaType. Added support for
	  ValidationType.Schema. Added support for XmlResolver. Fixed
	  ReadTypedValue() not to consume EndElement.

svn path=/trunk/mcs/; revision=17561
2003-08-24 19:10:41 +00:00
Atsushi Eno 8a41b1cdd2 2003-08-14 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs : Added SchemaType.
	  Read() Assures to return to element.
	* DTDObjectModel.cs : Removed DTDEntityDeclaration.BaseURI.
	* XmlReader.cs : ReadString() should be virtual in NET_1_1.
	* XmlTextReader.cs : 1) Depth should consider Attribute and its values.
	  Introduced insideAttribute field to support them.
	  2) ReadAttributeValue() should consider empty string.
	* XmlValidatingReader.cs :
	  Fixed several properties which premised as if it was already read.
	  Encoding and Namespaces now throws NotSupportedException for other
	  than XmlTextReader.
	  Implemented ReadTypedValue() based on IHasXmlSchemaInfo.SchemaType.

svn path=/trunk/mcs/; revision=17330
2003-08-14 15:56:58 +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 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 993194539b 2003-08-03 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs,
	  XmlNodeReader.cs,
	  XmlReader.cs,
	  XmlTextReader.cs,
	  XmlValidatingReader.cs : fixed pragma USE_VERSION_1_0 to NET_1_0.

svn path=/trunk/mcs/; revision=17016
2003-08-03 14:38:55 +00:00
Atsushi Eno 065f369a36 2003-08-03 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs : Added BaseURI (but not used yet).
	  DTDAttListDeclaration.ctro() now requires root dtd object model.
	* DTDValidatingReader.cs : Read() now expands EntityReference if
	  entity handling of validating reader is ExpandEntities.
	* XmlReader.cs,
	  XmlTextReader.cs,
	  XmlNodeReader.cs,
	  XmlValidatingReader.cs : Implemented "virtual" ReadInnerXml and
	    ReadOuterXml which are modified in MS.NET 1.1.
	* XmlConstructs.cs : added int version of IsValid, IsInvalid,
	  IsContent, IsMarkup and IsNCNameStart.
	  Fixed int version of IsXXX() to check array index range.
	  Added IsValidName (string).
	* XmlTextReader.cs :
	  - Read() handles document with non document element as an error.
	  - ReadText() and ReadCharacterReference() checkes illegal characters.
	  - ReadEntityReference() checks name validity.
	  - ReadProcessingInstruction() rejects such name that starts with
	    "xml" ignoring case, and checks attributes more strictly.
	  - ReadDeclaration() rejects unrecognized kind of declaration.
	  - In many places, added "required whitespace" check in DTD markup.
	  - DTD content model now disallows mixing use of '|' and ','.

svn path=/trunk/mcs/; revision=17012
2003-08-03 06:30:38 +00:00
Atsushi Eno 84f14cc90b 2003-08-02 Atsushi Enomoto <[email protected]>
* XmlDocumentFragment.cs : I missed to add it in relation to the
	  previous XmlParserContext patch. Similar to XmlAttribute/XmlElement.
	* XmlNodeReader.cs : removed some TODO attributes.
	* DTDValidatingReader.cs,
	  XmlValidatingReader.cs : Implemented ResolveEntity().

svn path=/trunk/mcs/; revision=17001
2003-08-02 06:36:37 +00:00
Atsushi Eno 750f51d4f9 2003-07-24 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs :
	  Read() now handles parser context stuff (BaseURI, XmlLang and
	  XmlSpace) correctly for an empty element.
	  Normalization property now doesn't throw an error. Will be used soon.
	* XmlValidatingReader.cs : added ValidationType.None support (wait for
	  the next DTDValidatingReader update for "not firing event handler).
	* XmlNodeReader.cs : jun. 30th commit seems wrong. It keeps its state.

svn path=/trunk/mcs/; revision=16609
2003-07-24 16:19:39 +00:00
Atsushi Eno 934b8c07bc 2003-07-19 Atsushi Enomoto <[email protected]>
* DTDValidatingReader.cs :
	  changed base class to XmlReader and implemented IXmlLineInfo members.
	  changed .ctor() argument from event handler to validating reader.
	  Removed some #if ... #else ... #endif blocks.
	  Added validation event support for Read() using HandleError().
	* XmlValidatingReader.cs : added internal OnValidationEvent().
	* XmlDocument.cs : ReadNode() now checks reader's state more strictly.

svn path=/trunk/mcs/; revision=16430
2003-07-19 16:39:15 +00:00