Thanks again for your reply.
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. 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>


2007/4/2, Hussein Shafie <hussein at xmlmind.com>:
> Fr?d?ric Boone wrote:
> > With xmldata.css it works! that's great!
> > Actually it is almost perfect for my schema there only one littlet thing:
> > I have abtract types in my schema, would you have an example at hand
> > of a css which allows to select all the possible extensions of the
> > abstract type through a combobox?
> >
>
> In my answer, I assume that you are not talking about setting the
> xsi:type attribute of an element.
>
> I assume that you want to choose between element B having type Btype,
> element C having type Ctype, element D having type Dtype, where Btype,
> Ctype and Dtype all extend the same abstract type Atype.
>
> In principle, there is nothing special to do: xmldata.css inserts a
> "Replace" button in the view. This button looks like this:
>
>    ^
>    |
> --/
>
> (See attached screenshot.) Click on it and you'll be able to choose
> between elements B, C and D (and hence, between the different extensions
> of abstract type Atype.)
>
>
>

Reply via email to