SchemaTypeMap(Module root) { schema = new XmlSchema (); schema.ElementFormDefault = XmlSchemaForm.Qualified; schema.AttributeFormDefault = XmlSchemaForm.Unqualified; schema.TargetNamespace = Generator.Namespace; schema.Namespaces.Add (Prefix, Generator.Namespace); root.RegisterSchemaTypes (this); root.CreateSchemaType (this); var rootElement = root.CreateSchemaElement (this); schema.Items.Add (rootElement); }
public QName LookupModuleTypeName(Module module) { var type = moduleMap [module.GetType ()]; return new QName (type.Name, schema.TargetNamespace); }
public bool IsRegistered(Module module) { return moduleMap.ContainsKey (module.GetType ()); }
public static XmlSchema CreateSchema(Module root) { return new SchemaTypeMap (root).Schema; }
public void RegisterModule(Module module, XmlSchemaComplexType type) { moduleMap.Add (module.GetType (), type); schema.Items.Add (type); }