Narsim;  Importing XML Schema compositors is performed with some
semantic interpretation.  Composer's xsd import is designed so that
multiple XML files (SXML) of the same XSD type would be mapped into
the same RDF classes, properties, etc.  From there the semantics
really depend on what the design intent is for the ontology.  In some
cases it may make sense to declare all of the classes in a choice
compositor disjoint.  In other cases this isn't necessary.

Just to be clear on choice compositors, consider the following schema:
  <xsd:element name="Fruit">
    <xsd:complexType>
      <xsd:choice>
        <xsd:element name="Apple" type="AppleType" />
        <xsd:element name="Orange" type="OrangeType" />
        <xsd:element name="Tangerine" type="OrangeType" />
        <xsd:element name="Banana" type="BananaType" />
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
<xsd:complexType name="AppleType"/>
<xsd:complexType name="OrangeType"/>
<xsd:complexType name="BananaType"/>

Composer's XSD importer will create classes for the types (e.g.
Orange) and properties for the choice elements (e.g. hasTangerine).
The choice type, Fruit, will contain subclass restrictions for each
choice element to have a max instance of 1 of the choice type (e.g.
hasTangerine all Orange, hasTangerine max 1).  Other restrictions can
easily be added to the model.

Again, this is consistent with SXML such that XML instances files of
this XSD type will map to the ontology created by XSD import.

All of this said, the xsd importer currently creates object properties
when the xsd choices are xsd:string types.  I.e. classes are not
created for the choices.  This creates a mismatch with XSML imports so
we are changing this for the next release.  In the meantime, just use
named types for the comparator choices.

'all' and 'sequence' comparators have similar mappings.  Again, the
goal is to create an ontology that consistently maps XSD typed XML
files to the ontology (e.g. sequence is not turned into an RDF list).

Hope that helps some.
-- Scott

On Nov 18, 12:43 pm, Narsim <[EMAIL PROTECTED]> wrote:
> Can we accurately import XML Schema compositors (especially, choice
> compositors)  as TBC ontology models? Or, must I have to use type to
> create super/sub classes. Thanks
> Narsim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to