2004-02-16 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 16 Feb 2004 18:02:38 +0000 (18:02 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 16 Feb 2004 18:02:38 +0000 (18:02 -0000)
* 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

mcs/class/System.XML/Mono.Xml.Schema/ChangeLog
mcs/class/System.XML/Mono.Xml.Schema/XsdIdentityPath.cs
mcs/class/System.XML/Mono.Xml.Schema/XsdIdentityState.cs
mcs/class/System.XML/Mono.Xml.Schema/XsdKeyTable.cs
mcs/class/System.XML/Mono.Xml.Schema/XsdParticleValidationState.cs
mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
mcs/class/System.XML/Mono.Xml.Schema/XsdWildcard.cs

index b3e114364f6e955ddfc7634d32331325fe0d1f1b..da670c848a559d3e122f9423a10e2047b89b7307 100644 (file)
@@ -1,3 +1,12 @@
+2004-02-16  Atsushi Enomoto <atsushi@ximian.com>
+
+       * XsdIdentityPath.cs,
+         XsdIdentityState.cs,
+         XsdKeyTable.cs,
+         XsdParticleValidationState.cs,
+         XsdValidatingReader.cs,
+         XsdWildcard.cs : made classes internal. Removed extra TODO comments.
+
 2004-02-08  Atsushi Enomoto <atsushi@ximian.com>
 
        * XsdIdentityState.cs,
index 43412168f88c527c5db78676d8726208ccf1e17f..41f1afe34dad8ed06c391f8d897b246fe2e5e831 100644 (file)
@@ -19,7 +19,7 @@ using System.Xml.Schema;
 \r
 namespace Mono.Xml.Schema\r
 {\r
-       public class XsdIdentitySelector\r
+       internal class XsdIdentitySelector\r
        {\r
                XsdIdentityPath [] selectorPaths;\r
 \r
@@ -50,7 +50,7 @@ namespace Mono.Xml.Schema
                }\r
        }\r
 \r
-       public class XsdIdentityField\r
+       internal class XsdIdentityField\r
        {\r
                XsdIdentityPath [] fieldPaths;\r
                int index;\r
@@ -70,7 +70,7 @@ namespace Mono.Xml.Schema
                }\r
        }\r
 \r
-       public class XsdIdentityPath\r
+       internal class XsdIdentityPath\r
        {\r
                public XsdIdentityStep [] OrderedSteps;\r
                public bool Descendants;\r
@@ -78,7 +78,7 @@ namespace Mono.Xml.Schema
                public string AttributeName;\r
        }\r
 \r
-       public class XsdIdentityStep\r
+       internal class XsdIdentityStep\r
        {\r
                public bool IsCurrent;\r
                public bool IsAttribute;\r
index f23dae1ded0c5cbed7ae3ecff1398161852af208..3cbc15552a737cbf71424a35f8d27bd965133ac3 100644 (file)
@@ -18,7 +18,7 @@ using System.Xml.Schema;
 \r
 namespace Mono.Xml.Schema\r
 {\r
-       public class XsdKeyEntryField\r
+       internal class XsdKeyEntryField\r
        {\r
                XsdKeyEntry entry;\r
                XsdIdentityField field;\r
@@ -182,7 +182,7 @@ namespace Mono.Xml.Schema
                }\r
        }\r
 \r
-       public class XsdKeyEntryFieldCollection : IList\r
+       internal class XsdKeyEntryFieldCollection : IList\r
        {\r
                ArrayList al = new ArrayList ();\r
 \r
@@ -275,7 +275,7 @@ namespace Mono.Xml.Schema
        }\r
 \r
        // Created per field/key pair, created per selector-matched element.\r
-       public class XsdKeyEntry\r
+       internal class XsdKeyEntry\r
        {\r
                public int StartDepth;\r
                public int CurrentStep;\r
index d9a418b1c3005bd17630e6e4fa4cdfad66334ef6..b23c6fc659340a39c96abd58355c3e18933dd6df 100644 (file)
@@ -15,7 +15,7 @@ using System.Xml.Schema;
 namespace Mono.Xml.Schema\r
 {\r
        // Created per constraining element.\r
-       public class XsdKeyTable\r
+       internal class XsdKeyTable\r
        {\r
                private XsdIdentitySelector selector;\r
                private XmlSchemaIdentityConstraint source;\r
index 24b89d88891cb1465e4d77e6bf2f5dd975e88638..23b372580f90e077eb22fe5fac1104c530d343a4 100644 (file)
@@ -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
                }\r
        }
 
-       public class XsdAllValidationState : XsdValidationState
+       internal class XsdAllValidationState : XsdValidationState
        {
                XmlSchemaAll all;
                ArrayList consumed = new ArrayList ();
@@ -530,7 +530,7 @@ namespace Mono.Xml.Schema
                }\r
        }
 
-       public class XsdAnyValidationState : XsdValidationState
+       internal class XsdAnyValidationState : XsdValidationState
        {
                XmlSchemaAny any;
 
@@ -584,7 +584,7 @@ namespace Mono.Xml.Schema
                }\r
        }
 
-       public class XsdAppendedValidationState : XsdValidationState
+       internal class XsdAppendedValidationState : XsdValidationState
        {
                public XsdAppendedValidationState (XsdValidationStateManager manager,
                        XsdValidationState head, XsdValidationState rest)
@@ -630,7 +630,7 @@ namespace Mono.Xml.Schema
                }\r
        }
 
-       public class XsdEmptyValidationState : XsdValidationState
+       internal class XsdEmptyValidationState : XsdValidationState
        {
                public XsdEmptyValidationState (XsdValidationStateManager manager)
                        : base (manager)
@@ -655,7 +655,7 @@ namespace Mono.Xml.Schema
 \r
        }
 
-       public class XsdInvalidValidationState : XsdValidationState
+       internal class XsdInvalidValidationState : XsdValidationState
        {
                internal XsdInvalidValidationState (XsdValidationStateManager manager)
                        : base (manager)
index 812ce5f7b7854a1afc4ec3993c9b111c7b0d542f..6e90adaf828119645375c32622ddb322af25af7d 100644 (file)
@@ -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 ;-(
index b7b2b557d2b38e5fd62cacd2f2fb483cb04e1b9d..e4a30cc3ad8904c80b8213f713c8a5d1292eaa11 100644 (file)
@@ -17,7 +17,7 @@ using System.Xml.Schema;
 \r
 namespace Mono.Xml.Schema\r
 {\r
-       public class XsdWildcard\r
+       internal class XsdWildcard\r
        {\r
                public XsdWildcard (XmlSchemaObject wildcard)\r
                {\r