+2004-11-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlSchemaElement.cs,
+ XmlSchemaComplexType.cs,
+ XmlSchema.cs,
+ XmlSchemaChoice.cs,
+ XmlSchemaSimpleType.cs,
+ XmlSchemaObjectTable.cs,
+ XmlSchemaObjectCollection.cs,
+ XmlSchemaCollection.cs,
+ : All changes are just for warning removal.
+
2004-11-24 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaDatatype.cs : added ParseValue() override.
private string targetNamespace ;
private XmlAttribute[] unhandledAttributes ;
private string version;
- private string language;
// other post schema compilation infoset
private Hashtable idCollection;
/// 3. id must be of type ID
/// 4. targetNamespace should be any uri
/// 5. version should be a normalizedString
- /// 6. xml:lang should be a language
/// </remarks>
public void Compile (ValidationEventHandler handler)
{
if (!XmlSchemaUtil.CheckNormalizedString(Version))
error(handler, Version + "is not a valid value for version attribute of schema");
- //6. xml:lang must be a language (removed)
-
// Compile the content of this schema
compilationItems = new XmlSchemaObjectCollection ();
case "version":
schema.version = reader.Value;
break;
- case "xml:lang":
- schema.language = reader.Value;
- break;
default:
if((reader.NamespaceURI == "" && reader.Name != "xmlns") || reader.NamespaceURI == XmlSchema.Namespace)
error(h, reader.Name + " attribute is not allowed in schema element",null);
return true;\r
\r
if (pd != null) {\r
- XmlSchemaElement el = pd as XmlSchemaElement;\r
+// XmlSchemaElement el = pd as XmlSchemaElement;\r
XmlSchemaParticle pdx = pd;\r
// if (el != null && el.SubstitutingElements.Count > 0)\r
// pdx = el.SubstitutingChoice;\r
if (!schema.IsCompiled)
return null;
- string ns = GetSafeNs (schema.TargetNamespace);
lock (schemaSet) {
// consider imported schemas.
schemaSet.Add (schema.Schemas);
error(h,"attributes, particles or anyattribute is not allowed if ContentModel is present");\r
errorCount += contentModel.Compile (h, schema);\r
\r
- XmlQualifiedName baseTypeName = null;\r
XmlSchemaSimpleContent smodel = ContentModel as XmlSchemaSimpleContent;\r
if(smodel != null)\r
{\r
XmlSchemaSimpleContentExtension sscx = smodel.Content as XmlSchemaSimpleContentExtension;\r
- if (sscx != null)\r
- baseTypeName = sscx.BaseTypeName;\r
- else {\r
+ if (sscx == null) {\r
XmlSchemaSimpleContentRestriction sscr = smodel.Content as XmlSchemaSimpleContentRestriction;\r
if (sscr != null) {\r
- baseTypeName = sscr.BaseTypeName;\r
if (sscr.BaseType != null) {\r
sscr.BaseType.Compile (h, schema);\r
BaseXmlSchemaTypeInternal = sscr.BaseType;\r
}\r
}\r
}\r
- else\r
- {\r
- XmlSchemaComplexContent cmodel = (XmlSchemaComplexContent) ContentModel;\r
- XmlSchemaComplexContentExtension sccx = cmodel.Content as XmlSchemaComplexContentExtension;\r
- if (sccx != null) {\r
- baseTypeName = sccx.BaseTypeName;\r
- }\r
- else {\r
- XmlSchemaComplexContentRestriction sccr = (XmlSchemaComplexContentRestriction) cmodel.Content;\r
- if (sccr != null) {\r
- baseTypeName = sccr.BaseTypeName;\r
- }\r
- }\r
- }\r
}\r
else\r
{\r
// do nothing for particle.\r
}\r
// otherwise, it might be missing sub components.\r
- else if (baseType == null && !schema.IsNamespaceAbsent (BaseSchemaTypeName.Namespace))// && schema.Schemas [baseTypeName.Namespace] != null)\r
+ else if (baseType == null && !schema.IsNamespaceAbsent (BaseSchemaTypeName.Namespace))\r
error (h, "Referenced base schema type " + BaseSchemaTypeName + " was not found in the corresponding schema.");\r
\r
// 3.4.3 Complex Type Definition Representation OK :: 2.\r
private XmlQualifiedName qName;\r
private XmlSchemaDerivationMethod blockResolved;\r
private XmlSchemaDerivationMethod finalResolved;\r
- private XmlSchemaParticle substChoice;\r
+// private XmlSchemaParticle substChoice;\r
private XmlSchemaElement referencedElement;\r
private ArrayList substitutingElements = new ArrayList ();\r
private XmlSchemaElement substitutionGroupElement;\r
// parentIsSchema = false; ... it is set in Schema's Compile()\r
blockResolved = XmlSchemaDerivationMethod.None;\r
finalResolved = XmlSchemaDerivationMethod.None;\r
- substChoice = null;\r
+// substChoice = null;\r
referencedElement = null;\r
substitutingElements.Clear ();\r
substitutionGroupElement = null;\r
XmlSchemaChoice choice = new XmlSchemaChoice ();\r
choice.MinOccurs = MinOccurs;\r
choice.MaxOccurs = MaxOccurs;\r
- substChoice = choice;\r
+// substChoice = choice;\r
choice.Compile (null, schema); // compute Validated Min/Max Occurs.\r
XmlSchemaElement item = this.MemberwiseClone () as XmlSchemaElement;\r
item.MinOccurs = 1;\r
/// </summary>\r
public class XmlSchemaObjectCollection : System.Collections.CollectionBase\r
{\r
- private XmlSchemaObject parent;\r
+// private XmlSchemaObject parent;\r
\r
public XmlSchemaObjectCollection()\r
{\r
}\r
+\r
public XmlSchemaObjectCollection(XmlSchemaObject parent)\r
{\r
- this.parent = parent;\r
+ // FIXME: how is it used publicly?\r
+// this.parent = parent;\r
}\r
\r
// Properties\r
{\r
private IDictionaryEnumerator xenum;\r
IEnumerable tmp;\r
- XmlSchemaObjectTable table;\r
internal XmlSchemaObjectTableEnumerator (XmlSchemaObjectTable table)\r
{\r
- this.table = table;\r
tmp = (IEnumerable) table.table;\r
xenum = (IDictionaryEnumerator) tmp.GetEnumerator ();\r
}\r
// TODO: 1.3 facet restriction valid.
break;
case XmlSchemaDerivationMethod.List:
+ /*\r
XmlSchemaSimpleTypeList thisList = Content as XmlSchemaSimpleTypeList;
- /*
// 2.1 item list type not allowed
if (baseSimpleType != null && baseSimpleType.resolvedDerivedBy == XmlSchemaDerivationMethod.List)
error (h, "Base list schema type is not allowed.");