Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Re: not supported (error)

Question posted by: Martin Honnen (Guest) on June 27th, 2008 07:20 PM
csharpula csharp wrote:
Quote:
Hello I keep getting such error:
>
The 'http://www.w3.org/2001/XMLSchema:restriction' element is not
supported in this context.
>
for the following xsd element:
>
<xs:element name="Name" type="xs:NCName">
<xs:restriction base="xs:string">
<xs:enumeration value="Audi"/>
<xs:enumeration value="Golf"/>
<xs:enumeration value="BMW"/>
</xs:restriction>
</xs:element>
>
Why is that?


What does that have to do with C#? Note that followup-to is set to
microsoft.public.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:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Audi"/>
<xs:enumeration value="Golf"/>
<xs:enumeration value="BMW"/>
</xs:restriction>
</xs:simpleType>
</xs:element>


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
 
Not the answer you were looking for? Post your question . . .
189,798 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors