Kaynağa Gözat

2004-02-16 Atsushi Enomoto <[email protected]>

	* XsdIdentityPath.cs,
	  XsdIdentityState.cs,
	  XsdKeyTable.cs,
	  XsdParticleValidationState.cs,
	  XsdValidatingReader.cs,
	  XsdWildcard.cs : made classes internal. Removed extra TODO comments.

svn path=/trunk/mcs/; revision=23136
Atsushi Eno 22 yıl önce
ebeveyn
işleme
fba6386bf0

+ 9 - 0
mcs/class/System.XML/Mono.Xml.Schema/ChangeLog

@@ -1,3 +1,12 @@
+2004-02-16  Atsushi Enomoto <[email protected]>
+
+	* XsdIdentityPath.cs,
+	  XsdIdentityState.cs,
+	  XsdKeyTable.cs,
+	  XsdParticleValidationState.cs,
+	  XsdValidatingReader.cs,
+	  XsdWildcard.cs : made classes internal. Removed extra TODO comments.
+
 2004-02-08  Atsushi Enomoto <[email protected]>
 
 	* XsdIdentityState.cs,

+ 4 - 4
mcs/class/System.XML/Mono.Xml.Schema/XsdIdentityPath.cs

@@ -19,7 +19,7 @@ using System.Xml.Schema;
 
 namespace Mono.Xml.Schema
 {
-	public class XsdIdentitySelector
+	internal class XsdIdentitySelector
 	{
 		XsdIdentityPath [] selectorPaths;
 
@@ -50,7 +50,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdIdentityField
+	internal class XsdIdentityField
 	{
 		XsdIdentityPath [] fieldPaths;
 		int index;
@@ -70,7 +70,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdIdentityPath
+	internal class XsdIdentityPath
 	{
 		public XsdIdentityStep [] OrderedSteps;
 		public bool Descendants;
@@ -78,7 +78,7 @@ namespace Mono.Xml.Schema
 		public string AttributeName;
 	}
 
-	public class XsdIdentityStep
+	internal class XsdIdentityStep
 	{
 		public bool IsCurrent;
 		public bool IsAttribute;

+ 3 - 3
mcs/class/System.XML/Mono.Xml.Schema/XsdIdentityState.cs

@@ -18,7 +18,7 @@ using System.Xml.Schema;
 
 namespace Mono.Xml.Schema
 {
-	public class XsdKeyEntryField
+	internal class XsdKeyEntryField
 	{
 		XsdKeyEntry entry;
 		XsdIdentityField field;
@@ -182,7 +182,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdKeyEntryFieldCollection : IList
+	internal class XsdKeyEntryFieldCollection : IList
 	{
 		ArrayList al = new ArrayList ();
 
@@ -275,7 +275,7 @@ namespace Mono.Xml.Schema
 	}
 
 	// Created per field/key pair, created per selector-matched element.
-	public class XsdKeyEntry
+	internal class XsdKeyEntry
 	{
 		public int StartDepth;
 		public int CurrentStep;

+ 1 - 1
mcs/class/System.XML/Mono.Xml.Schema/XsdKeyTable.cs

@@ -15,7 +15,7 @@ using System.Xml.Schema;
 namespace Mono.Xml.Schema
 {
 	// Created per constraining element.
-	public class XsdKeyTable
+	internal class XsdKeyTable
 	{
 		private XsdIdentitySelector selector;
 		private XmlSchemaIdentityConstraint source;

+ 11 - 11
mcs/class/System.XML/Mono.Xml.Schema/XsdParticleValidationState.cs

@@ -14,7 +14,7 @@ using Mono.Xml;
 
 namespace Mono.Xml.Schema
 {
-	public enum XsdParticleEvaluationResult
+	internal enum XsdParticleEvaluationResult
 	{
 		Matched = 1,	// Matched one of its components.
 		Passed = 2,	// Did not match, but it successfully passed the whole components.
@@ -22,7 +22,7 @@ namespace Mono.Xml.Schema
 		Mismatched = 4	// Dis not match, 
 	}
 
-	public class XsdValidationStateManager
+	internal class XsdValidationStateManager
 	{
 		Hashtable table;
 		XmlSchemaElement currentElement;
@@ -127,7 +127,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public abstract class XsdValidationState
+	internal abstract class XsdValidationState
 	{
 		// Static members
 
@@ -184,7 +184,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdElementValidationState : XsdValidationState
+	internal class XsdElementValidationState : XsdValidationState
 	{
 		public XsdElementValidationState (XmlSchemaElement element, XsdValidationStateManager manager)
 			: base (manager)
@@ -243,7 +243,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdSequenceValidationState : XsdValidationState
+	internal class XsdSequenceValidationState : XsdValidationState
 	{
 		XmlSchemaSequence seq;
 		int current;
@@ -389,7 +389,7 @@ namespace Mono.Xml.Schema
 
 	}
 
-	public class XsdChoiceValidationState : XsdValidationState
+	internal class XsdChoiceValidationState : XsdValidationState
 	{
 		XmlSchemaChoice choice;
 		bool emptiable;
@@ -468,7 +468,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdAllValidationState : XsdValidationState
+	internal class XsdAllValidationState : XsdValidationState
 	{
 		XmlSchemaAll all;
 		ArrayList consumed = new ArrayList ();
@@ -530,7 +530,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdAnyValidationState : XsdValidationState
+	internal class XsdAnyValidationState : XsdValidationState
 	{
 		XmlSchemaAny any;
 
@@ -584,7 +584,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdAppendedValidationState : XsdValidationState
+	internal class XsdAppendedValidationState : XsdValidationState
 	{
 		public XsdAppendedValidationState (XsdValidationStateManager manager,
 			XsdValidationState head, XsdValidationState rest)
@@ -630,7 +630,7 @@ namespace Mono.Xml.Schema
 		}
 	}
 
-	public class XsdEmptyValidationState : XsdValidationState
+	internal class XsdEmptyValidationState : XsdValidationState
 	{
 		public XsdEmptyValidationState (XsdValidationStateManager manager)
 			: base (manager)
@@ -655,7 +655,7 @@ namespace Mono.Xml.Schema
 
 	}
 
-	public class XsdInvalidValidationState : XsdValidationState
+	internal class XsdInvalidValidationState : XsdValidationState
 	{
 		internal XsdInvalidValidationState (XsdValidationStateManager manager)
 			: base (manager)

+ 2 - 15
mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs

@@ -21,7 +21,7 @@ using Mono.Xml;
 
 namespace Mono.Xml.Schema
 {
-	public class XsdValidatingReader : XmlReader, IXmlLineInfo, IHasXmlSchemaInfo, IHasXmlParserContext
+	internal class XsdValidatingReader : XmlReader, IXmlLineInfo, IHasXmlSchemaInfo, IHasXmlParserContext
 	{
 		static char [] wsChars = new char [] {' ', '\t', '\n', '\r'};
 
@@ -556,7 +556,6 @@ namespace Mono.Xml.Schema
 		// Utility for missing validation completion related to child items.
 		private void ValidateCharacters ()
 		{
-			// TODO: value context validation here.
 			if (xsiNilDepth >= 0 && xsiNilDepth < reader.Depth)
 				HandleError ("Element item appeared, while current element context is nil.");
 
@@ -573,7 +572,6 @@ namespace Mono.Xml.Schema
 
 			if (storedCharacters.Length == 0) {
 				// 3.3.4 Element Locally Valid (Element) 5.1.2
-				// TODO: check entire DefaultValid (3.3.6)
 				if (context.Element != null) {
 					if (context.Element.ValidatedDefaultValue != null)
 						value = context.Element.ValidatedDefaultValue;
@@ -837,7 +835,6 @@ namespace Mono.Xml.Schema
 						// If current schema type exists, then this xsi:type must be
 						// valid extension of that type. See 1.2.1.2.4.
 						if (context.Element != null) {
-							// FIXME: supply *correct* base type
 							AssessLocalTypeDerivationOK (xsiType, context.Element.ElementType, context.Element.BlockResolved);
 						}
 						AssessStartElementLocallyValidType (xsiType);	// 1.2.2:
@@ -975,7 +972,6 @@ namespace Mono.Xml.Schema
 		}
 
 		// 3.4.4 Element Locally Valid (Complex Type)
-		// TODO ("wild IDs constraints.")
 		private void AssessElementLocallyValidComplexType (XmlSchemaComplexType cType)
 		{
 			// 1.
@@ -1011,7 +1007,6 @@ namespace Mono.Xml.Schema
 
 			// Collect default attributes.
 			// 4.
-			// FIXME: FixedValue check maybe extraneous.
 			foreach (DictionaryEntry entry in cType.AttributeUses) {
 				XmlSchemaAttribute attr = (XmlSchemaAttribute) entry.Value;
 				if (reader [attr.QualifiedName.Name, attr.QualifiedName.Namespace] == null) {
@@ -1076,7 +1071,6 @@ namespace Mono.Xml.Schema
 		}
 
 		// 3.2.4 Attribute Locally Valid and 3.4.4 - 5.wildIDs
-		// TODO
 		private void AssessAttributeLocallyValid (XmlSchemaAttribute attr, bool checkWildIDs)
 		{
 			// 1.
@@ -1086,7 +1080,7 @@ namespace Mono.Xml.Schema
 			case XmlSchema.InstanceNamespace:
 				break;
 			}
-			// TODO 2. - 4.
+			// 2. - 4.
 			if (attr.AttributeType == null)
 				HandleError ("Attribute type is missing for " + attr.QualifiedName);
 			XmlSchemaDatatype dt = attr.AttributeType as XmlSchemaDatatype;
@@ -1103,7 +1097,6 @@ namespace Mono.Xml.Schema
 				}
 				if (attr.ValidatedFixedValue != null && attr.ValidatedFixedValue != normalized)
 					HandleError ("The value of the attribute " + attr.QualifiedName + " does not match with its fixed value.");
-				// FIXME: this is extraneous checks in 3.2.4 Attribute Locally Valid.
 				if (checkWildIDs)
 					AssessEachAttributeIdentityConstraint (dt, normalized, parsedValue);
 			}
@@ -1157,10 +1150,8 @@ namespace Mono.Xml.Schema
 			}
 		}
 
-		// TODO
 		private void AssessAttributeLocallyValidUse (XmlSchemaAttribute attr)
 		{
-			// TODO: value constraint check
 			// This is extra check than spec 3.5.4
 			if (attr.ValidatedUse == XmlSchemaUse.Prohibited)
 				HandleError ("Attribute " + attr.QualifiedName + " is prohibited in this context.");
@@ -1225,7 +1216,6 @@ namespace Mono.Xml.Schema
 		}
 
 		// 3.11.4 Identity Constraint Satisfied
-		// TODO
 		private void AssessStartIdentityConstraints ()
 		{
 			tmpKeyrefPool.Clear ();
@@ -1255,9 +1245,6 @@ namespace Mono.Xml.Schema
 				// If possible, create new field entry candidates.
 				for (int j = 0; j < seq.Entries.Count; j++) {
 					XsdKeyEntry entry = seq.Entries [j] as XsdKeyEntry;
-//					if (entry.KeyFound)
-// FIXME: it should not be skipped for multiple key check!!
-//						continue;
 					try {
 						entry.FieldMatches (this.elementQNameStack, this);
 					} catch (Exception ex) { // FIXME: (wishlist) It is bad manner ;-(

+ 1 - 1
mcs/class/System.XML/Mono.Xml.Schema/XsdWildcard.cs

@@ -17,7 +17,7 @@ using System.Xml.Schema;
 
 namespace Mono.Xml.Schema
 {
-	public class XsdWildcard
+	internal class XsdWildcard
 	{
 		public XsdWildcard (XmlSchemaObject wildcard)
 		{