XML Schema Validation failing for derived type -


i know whats type of xsd attribute defined xsd simpletype , below schema failing validation because of that. please take loot @ this, schema validator tools throwing error @ "*" demarcated region saying base attributes type not derived correctly..not sure if correct structure define...i have no business model aroud , trying play different options of restrictions , extensions here..

    <xsd:complextype name="comptype_simplecontent">       <xsd:simplecontent>         <xsd:restriction base="aaa">             <xsd:attribute name="aaa_attr" *type="xsd:anysimpletype"*></xsd:attribute>         </xsd:restriction>       </xsd:simplecontent>    </xsd:complextype>     <xsd:complextype name="aaa" block="extension">      <xsd:simplecontent>          <xsd:extension base="xsd:integer">             <xsd:attribute name="aaa_attr">                 <xsd:simpletype>                     <xsd:restriction base="xsd:decimal">                         <xsd:minexclusive value="90"></xsd:minexclusive>                     </xsd:restriction>                 </xsd:simpletype>             </xsd:attribute>         </xsd:extension>     </xsd:simplecontent>  </xsd:complextype>  

aaa defines complex type integer content , decimal attribute; example might be

<x aaa_attr="93.7">5</x> 

you define comptype_simplecontent restriction of this, means elements allows must subset of aaa allows. in restriction, instead of narrowing range of values allowed in attribute, can take value @ (anysimpletype). that's not allowed; restricted type can't allow things base type disallows.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -