Hi,
I am writing C# code to produce xml schema.
//Create attribute
XmlSchemaAttribute att2 = new XmlSchemaAttribute();
att2.Name = "CustomerID";
att2.SchemaTypeName = new XmlQualifiedName("int",schemaNS);
att2.Use = XmlSchemaUse.Required;
ct.Attributes.Add(att2);
I need to produce schema with custom data type instead of the
xsd:string or xsd:int
The code above will produce the following schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema attributeFormDefault="unqualified" version="1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Customer">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Order">
<xsd:complexType>
<xsd:attribute name="CustomerID" type="xsd:int"
use="required" />
<xsd:attribute name="OrderID" type="xsd:int" use="required"
/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="CustomerID" type="xsd:StringType"
use="required" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
I need to produce schema with
<xsd:attribute name="CustomerID" type="IntType" use="required" />
or
<xsd:attribute name="CustomerID" type="StringType" use="required" />
when I use
att2.SchemaTypeName = new XmlQualifiedName("IntType",schemaNS);
I get
<xsd:attribute name="CustomerID" type="xsd:IntType" use="required" />
How do I get the type to equal only "IntType" without the "xsd" part?
Thanks