EDN Admin
Well-known member
I have 2 XSD files.
One XSD file lets say ABC.xsd contains the elements which are part of Schema. The other XSD file lets say XYZ.xsd contains the definitions of those elements.
<span style="text-decoration:underline ABC.xsd schema like
<?xml version="1.0" encoding="utf-8"?> <br/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" <br/>
xmlns="urn:customer-schema" <br/>
elementFormDefault="qualified" <br/>
targetNamespace="urn:customer-schema <br/>
<br/>
<xs:element name="Customer" nillable="true" type="Customer" >
<br/>
</xs:element> <br/>
<xs:complexType name="Customer <br/>
<xs:sequence> <br/>
<xs:element minOccurs="0" maxOccurs="1" name="MiddleName" type="xs:string" /> <br/>
<xs:element minOccurs="1" maxOccurs="1" name="FirstName" type="xs:unsignedInt" /> <br/>
<xs:element minOccurs="1" maxOccurs="1" name="LastName" type="xs:boolean" /> <br/>
<xs:element minOccurs="1" maxOccurs="1" name="CustomerId" xmlns:q1="urn:advisor-schema" type="q1:guid" /> <br/>
</xs:sequence> <br/>
</xs:complexType>
</xs:schema>
<br/>
<span style="text-decoration:underline xyz.xsd schema like
<?xml version="1.0" encoding="utf-8"?> <br/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" <br/>
xmlns="urn:customer-schema" <br/>
elementFormDefault="qualified <br/>
<br/>
<xs:simpleType name="guid <br/>
<xs:restriction base="xs:string <br/>
<xsattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" /> <br/>
</xs:restriction> <br/>
</xs:simpleType> <br/>
</xs:schema>
</xs:schema>
<br/>
<span style="text-decoration:underline i have written command line like
ProcessStartInfo m_startInfo = new ProcessStartInfo();<br/>
m_startInfo.CreateNoWindow = false;
<br/>
m_startInfo.UseShellExecute = false;
<br/>
m_startInfo.FileName = """ + @"Crogram Files (x86)Microsoft SDKsWindowsv7.0ABinxsd.exe" + """;
<br/>
m_startInfo.WindowStyle = ProcessWindowStyle.Hidden;
<br/>
m_startInfo.Arguments = scemaPath + " /Classes /L:CS /o:" + classpath + " /n:" + Path.GetFileNameWithoutExtension("ABC.xsd") + " /parameter:XYZ.xsd";
<br/>
using (Process exeProcess = Process.Start(m_startInfo))<br/>
{<br/>
exeProcess.WaitForExit();<br/>
}
the problem is class is not generating.
Is any thing mistake or line in schema. Any help would be appreicate
Thanks,
Suman G
<br/>
<br/>
<br/>
View the full article
One XSD file lets say ABC.xsd contains the elements which are part of Schema. The other XSD file lets say XYZ.xsd contains the definitions of those elements.
<span style="text-decoration:underline ABC.xsd schema like
<?xml version="1.0" encoding="utf-8"?> <br/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" <br/>
xmlns="urn:customer-schema" <br/>
elementFormDefault="qualified" <br/>
targetNamespace="urn:customer-schema <br/>
<br/>
<xs:element name="Customer" nillable="true" type="Customer" >
<br/>
</xs:element> <br/>
<xs:complexType name="Customer <br/>
<xs:sequence> <br/>
<xs:element minOccurs="0" maxOccurs="1" name="MiddleName" type="xs:string" /> <br/>
<xs:element minOccurs="1" maxOccurs="1" name="FirstName" type="xs:unsignedInt" /> <br/>
<xs:element minOccurs="1" maxOccurs="1" name="LastName" type="xs:boolean" /> <br/>
<xs:element minOccurs="1" maxOccurs="1" name="CustomerId" xmlns:q1="urn:advisor-schema" type="q1:guid" /> <br/>
</xs:sequence> <br/>
</xs:complexType>
</xs:schema>
<br/>
<span style="text-decoration:underline xyz.xsd schema like
<?xml version="1.0" encoding="utf-8"?> <br/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" <br/>
xmlns="urn:customer-schema" <br/>
elementFormDefault="qualified <br/>
<br/>
<xs:simpleType name="guid <br/>
<xs:restriction base="xs:string <br/>
<xsattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" /> <br/>
</xs:restriction> <br/>
</xs:simpleType> <br/>
</xs:schema>
</xs:schema>
<br/>
<span style="text-decoration:underline i have written command line like
ProcessStartInfo m_startInfo = new ProcessStartInfo();<br/>
m_startInfo.CreateNoWindow = false;
<br/>
m_startInfo.UseShellExecute = false;
<br/>
m_startInfo.FileName = """ + @"Crogram Files (x86)Microsoft SDKsWindowsv7.0ABinxsd.exe" + """;
<br/>
m_startInfo.WindowStyle = ProcessWindowStyle.Hidden;
<br/>
m_startInfo.Arguments = scemaPath + " /Classes /L:CS /o:" + classpath + " /n:" + Path.GetFileNameWithoutExtension("ABC.xsd") + " /parameter:XYZ.xsd";
<br/>
using (Process exeProcess = Process.Start(m_startInfo))<br/>
{<br/>
exeProcess.WaitForExit();<br/>
}
the problem is class is not generating.
Is any thing mistake or line in schema. Any help would be appreicate
Thanks,
Suman G
<br/>
<br/>
<br/>
View the full article