In general, one cannot customize the names of the generated classes when using xsd.exe - unlike mechanisms available elsewhere, for e.g. a JAXB user through custom JAXB binding file.
However, for xsd.exe the generated class names depend on the authoring style. What you described, is generated when the authoring style is conformant to the "Russian Doll" i.e. as below:
<?xml version="1.0" encoding="utf-8"?>
<!--XML Schema generated by QTAssistant/XML Schema Refactoring (XSR) Module (http://www.paschidev.com)-->
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Students">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Student">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Department">
<xsd:complexType>
<xsd:attribute name="Id" type="xsd:unsignedByte" use="required" />
<xsd:attribute name="Name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use="required" />
<xsd:attribute name="RollNo" type="xsd:unsignedByte" use="required" />
<xsd:attribute name="Address" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
If you change its style to something different (this is called a Venetian Blind):
<?xml version="1.0" encoding="utf-8"?>
<!--XML Schema generated by QTAssistant/XML Schema Refactoring (XSR) Module (http://www.paschidev.com)-->
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Students" type="Students"/>
<xsd:complexType name="Students">
<xsd:sequence>
<xsd:element name="Student" type="Student"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Student">
<xsd:sequence>
<xsd:element name="Department" type="Department"/>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use="required"/>
<xsd:attribute name="RollNo" type="xsd:unsignedByte" use="required"/>
<xsd:attribute name="Address" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="Department">
<xsd:attribute name="Id" type="xsd:unsignedByte" use="required"/>
<xsd:attribute name="Name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:schema>
You'll be getting these classes generated:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…