AddAttribute() private method

private AddAttribute ( XmlSchemaObject value ) : void
value XmlSchemaObject
return void
Example #1
0
 /*
     <attribute 
       form = qualified | unqualified 
       id = ID 
       name = NCName 
       ref = QName 
       type = QName 
       use = prohibited | optional | required | default | fixed : optional
       value = string 
       {any attributes with non-schema namespace . . .}>
       Content: (annotation? , (simpleType?))
     </attribute>
 */
 private static void InitAttribute(XsdBuilder builder, string value) {
     builder.xso = builder.attribute = new XmlSchemaAttribute();
     if (builder.ParentElement == SchemaNames.Token.XsdSchema)
         builder.schema.Items.Add(builder.attribute);
     else 
         builder.AddAttribute(builder.attribute);
     builder.canIncludeImport = false;  // disable import and include elements in schema
 }
Example #2
0
 /*
     <attributeGroup 
       id = ID 
       ref = QName 
       {any attributes with non-schema namespace . . .}>
       Content: (annotation?)
     </attributeGroup>
 */
 private static void InitAttributeGroupRef(XsdBuilder builder, string value) {
     builder.xso = builder.attributeGroupRef = new XmlSchemaAttributeGroupRef();
     builder.AddAttribute(builder.attributeGroupRef);
 }
 private static void InitAttribute(XsdBuilder builder, string value)
 {
     builder.xso = builder.attribute = new XmlSchemaAttribute();
     if (builder.ParentElement == SchemaNames.Token.XsdSchema)
     {
         builder.schema.Items.Add(builder.attribute);
     }
     else
     {
         builder.AddAttribute(builder.attribute);
     }
     builder.canIncludeImport = false;
 }