internal static void AddDefaultXmlType(XmlSchemaSet schemas, string localName, string ns) { XmlSchemaComplexType defaultXmlType = CreateAnyType(); defaultXmlType.Name = localName; XmlSchema schema = SchemaHelper.GetSchema(ns, schemas); schema.Items.Add(defaultXmlType); schemas.Reprocess(schema); }
private static void AddDefaultTypedDatasetType(XmlSchemaSet schemas, XmlSchema datasetSchema, string localName, string ns) { XmlSchemaComplexType type = new XmlSchemaComplexType(); type.Name = localName; type.Particle = new XmlSchemaSequence(); XmlSchemaAny any = new XmlSchemaAny(); any.Namespace = (datasetSchema.TargetNamespace == null) ? String.Empty : datasetSchema.TargetNamespace; ((XmlSchemaSequence)type.Particle).Items.Add(any); schemas.Add(datasetSchema); XmlSchema schema = SchemaHelper.GetSchema(ns, schemas); schema.Items.Add(type); schemas.Reprocess(datasetSchema); schemas.Reprocess(schema); }
private static void AddDefaultDatasetType(XmlSchemaSet schemas, string localName, string ns) { XmlSchemaComplexType type = new XmlSchemaComplexType(); type.Name = localName; type.Particle = new XmlSchemaSequence(); XmlSchemaElement schemaRefElement = new XmlSchemaElement(); schemaRefElement.RefName = new XmlQualifiedName(Globals.SchemaLocalName, XmlSchema.Namespace); ((XmlSchemaSequence)type.Particle).Items.Add(schemaRefElement); XmlSchemaAny any = new XmlSchemaAny(); ((XmlSchemaSequence)type.Particle).Items.Add(any); XmlSchema schema = SchemaHelper.GetSchema(ns, schemas); schema.Items.Add(type); schemas.Reprocess(schema); }
private XmlSchema GetSchema(string ns) { return(SchemaHelper.GetSchema(ns, Schemas)); }