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