Re: not supported (error)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Honnen

    Re: not supported (error)

    csharpula csharp wrote:
    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?
    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

Working...