> Hello,
> I have a simple schema as shown below. When I validate it, I get the error
[quoted text clipped - 14 lines]
> </xsd:complexType>
> </xsd:element>
Ganesh,
The following defines <no namespace>:emptype, not xsd:emptype (which is
http://www.w3.org/2001/XMLSchema:emptype). The xsd namespace belongs to
someone else (w3c). You do not define things in someone else's namespace!
> <xsd:simpleType name="emptype">
> <xsd:restriction base="xsd:string">
[quoted text clipped - 4 lines]
> </xsd:schema>
> **********************
<xsd:schema xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:tns="urn:GaneshMuthuvelu" targetNamespace=="urn:GaneshMuthuvelu">
...
<xsd:element name="EmployeeType" type="tns:emptype" />
...
<xsd:simpleType name="emptype">
...
Your schema will be defining names in your namespace. When you need to refer
to those names in the schema itself, you can refer to them with the
tns:<name>. Note that the use of "tns" as a prefix is only a convention -
you can use any prefix you like, but it's frequently useful to define a
prefix which matches the targetNamespace.
I hope that helps.
John
(still learning xsd subleties myself)