Exemple #1
0
        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);
        }
Exemple #2
0
 public QName LookupModuleTypeName(Module module)
 {
     var type = moduleMap [module.GetType ()];
     return new QName (type.Name, schema.TargetNamespace);
 }
Exemple #3
0
 public bool IsRegistered(Module module)
 {
     return moduleMap.ContainsKey (module.GetType ());
 }
Exemple #4
0
 public static XmlSchema CreateSchema(Module root)
 {
     return new SchemaTypeMap (root).Schema;
 }
Exemple #5
0
 public void RegisterModule(Module module, XmlSchemaComplexType type)
 {
     moduleMap.Add (module.GetType (), type);
     schema.Items.Add (type);
 }