Remainder: in my answer, I assume that you are not talking about setting
the "xsi:type" attribute of an element.



Fr?d?ric Boone wrote:
> In fact with the replace button I have access to the abstract type
> itself but not to the extensions, ideally I would like to see the
> abstract type, only its extensions. 

The menu displayed by the "Replace" button is automatically built based
on the content model you have specified in your schema. That is, it
faithfully reflects the reality of your schema. If you are not satisfied
with what you see, then the problem lies in your schema.



> Maybe my schema is special, I copy
> below the part of the schema (in fact it's made of several xsd) that
> contains the abstract type ParamType and all its extensions:
> 
> <xs:schema
>        xmlns:xs="http://www.w3.org/2001/XMLSchema";
>        elementFormDefault="qualified"
>        targetNamespace="astromodelns"
>        xmlns="astromodelns">
> 
>  <xs:annotation>
>    <xs:documentation xml:lang="en">
>      Parameters for AstroModelSchemas
>      Author: Frederic Boone
>      Copyright 2005 All rights reserved.
>    </xs:documentation>
>  </xs:annotation>
> 
> 
>  <xs:complexType name="ParamType" abstract="true">
>     <xs:sequence>
>       <xs:element name="name" type="xs:string"/>
>       <xs:element name="varName" type="xs:string"/>
>       <xs:element name="unit" type="xs:string"/>
>       <xs:element name="description" type="xs:string"/>
>     </xs:sequence>
>  </xs:complexType>
> 
>  <xs:complexType name="ParamFloat">
>    <xs:complexContent>
>      <xs:extension base="ParamType">
>        <xs:sequence>
>           <xs:element name="default" type="xs:float"/>
>           <!--element name="min" type="xs:float" minOccurs="0"
> default="-INF"/>
>           <xs:element name="max" type="xs:float" minOccurs="0"
> default="INF"/-->
>        </xs:sequence>
>      <xs:attribute name="min" type="xs:float" default="-INF"/>
>      <xs:attribute name="max" type="xs:float" default="INF"/>
>      </xs:extension>
>    </xs:complexContent>
>  </xs:complexType>
> 
>  <xs:complexType name="ParamInt">
>    <xs:complexContent>
>      <xs:extension base="ParamType">
>        <xs:sequence>
>           <xs:element name="default" type="xs:int"/>
>        </xs:sequence>
>      <xs:attribute name="min" type="xs:int" default="-9999999"/>
>      <xs:attribute name="max" type="xs:int" default="9999999"/>
>      </xs:extension>
>    </xs:complexContent>
>  </xs:complexType>
> 
> 
>  <xs:complexType name="ParamString">
>    <xs:complexContent>
>      <xs:extension base="ParamType">
>        <xs:sequence>
>           <xs:element name="default" type="xs:string"/>
>        </xs:sequence>
>       </xs:extension>
>    </xs:complexContent>
>  </xs:complexType>
> 
>  <xs:complexType name="ParamCoor">
>    <xs:complexContent>
>      <xs:extension base="ParamType">
>        <xs:sequence>
>           <xs:element name="default" type="coordinate"/>
>        </xs:sequence>
>      <xs:attribute name="min" type="coordinate" default="-90:00:00"/>
>      <xs:attribute name="max" type="coordinate" default="90:00:00"/>
>      <xs:attribute name="varUnit" type="angleunits" default="degree"/>
>      </xs:extension>
>    </xs:complexContent>
>  </xs:complexType>
> 
> <xs:simpleType name="coordinate">
>  <xs:restriction base="xs:string">
>    <xs:pattern value="(\+|\-)?\d{2}:\d{2}:\d{2}(\.\d*)?"/>
>  </xs:restriction>
> </xs:simpleType>
> 
> <xs:simpleType name="angleunits">
>  <xs:restriction base="xs:string">
>    <xs:enumeration value="degree"/>
>    <xs:enumeration value="radian"/>
>   </xs:restriction>
> </xs:simpleType>
> 
> </xs:schema>

[1] Your schema is not special.

[2] Where are the *element* (or attribute) *declarations* making use of
the ParamFloat, ParamInt, ParamString, etc, types? Types are merely W3C
XML Schema syntactic sugar. What counts is the elements and the attributes.



Reply via email to