csharpula csharp wrote:
What does that have to do with C#? Note that followup-to is set to
microsoft.publi c.dotnet.xml.
If you want to define the type of an element as an enumeration then the
proper schema syntax is
<xs:element name="Name">
<xs:simpleTyp e>
<xs:restricti on base="xs:string ">
<xs:enumerati on value="Audi"/>
<xs:enumerati on value="Golf"/>
<xs:enumerati on value="BMW"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
--
Martin Honnen --- MVP XML
Hello I keep getting such error:
>
The 'http://www.w3.org/2001/XMLSchema:restr iction' element is not
supported in this context.
>
for the following xsd element:
>
<xs:element name="Name" type="xs:NCName ">
<xs:restricti on base="xs:string ">
<xs:enumerati on value="Audi"/>
<xs:enumerati on value="Golf"/>
<xs:enumerati on value="BMW"/>
</xs:restriction>
</xs:element>
>
Why is that?
>
The 'http://www.w3.org/2001/XMLSchema:restr iction' element is not
supported in this context.
>
for the following xsd element:
>
<xs:element name="Name" type="xs:NCName ">
<xs:restricti on base="xs:string ">
<xs:enumerati on value="Audi"/>
<xs:enumerati on value="Golf"/>
<xs:enumerati on value="BMW"/>
</xs:restriction>
</xs:element>
>
Why is that?
microsoft.publi c.dotnet.xml.
If you want to define the type of an element as an enumeration then the
proper schema syntax is
<xs:element name="Name">
<xs:simpleTyp e>
<xs:restricti on base="xs:string ">
<xs:enumerati on value="Audi"/>
<xs:enumerati on value="Golf"/>
<xs:enumerati on value="BMW"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
--
Martin Honnen --- MVP XML