Pim,

The result in topbraid contains an owl "schema" shows the Azimuth as a
class. Also an instance of Azimuth is created in the RDF-file, but the
value 2.2 I would expect somewhere in this instance is gone. Further
more the class Azimuth is a subbclass with a restriction "rdf:value only
AzimuthDataType". And this AzimuthDataType is a subClassOf xsd:double.
Why is this AzimuthDataType class created? The restrictions on the Azimuth element I can't find either.

The imported XSD element "Azimuth" is created as the OWL class "Azimuth" and the OWL datatype "AzimuthDataType" in the ontology. For an XSD element, an OWL class is always generated. If there is a simpleType specified for an element in XSD, then a corresponding user-defined OWL datatype is also generated. The rdf:value restriction relates the OWL class to the OWL datatype. The OWL datatype can be used as a datatype for literals. In this case, the OWL class is more of a placeholder. Generally, the OWL class also contains other restrictions, which are generated from attributes and children elements of the corresponding XSD element. For example, if "Azimuth" had a complexType with a simpleContent, then it would also be possible to define attributes for Azimuth type.

We will look into the instances issue.

Gokhan



Helm, P.W. (Pim) van den wrote:
Hi Scott,
I created a smaller example based on your example. The xsd now contains
an extra element/propery.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified">
  <xsd:element name="Process">
    <xsd:complexType>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:element name="Process" type="ProcessType" />
        <xsd:element name="Activity" type="ActivityType" />
        <xsd:element ref="Azimuth" />
      </xsd:choice>
      <xsd:attribute name="name" type="xsd:string"/>
    </xsd:complexType>
  </xsd:element>

  <xsd:complexType name="ProcessType">
     <xsd:sequence minOccurs="0" maxOccurs="unbounded">
        <xsd:element name="Activity" type="ActivityType"/>
     </xsd:sequence>
     <xsd:attribute name="name" type="xsd:string"/>
  </xsd:complexType>

  <xsd:complexType name="ActivityType">
     <xsd:attribute name="name" type="xsd:string"/>
     <xsd:attribute name="efficiency" type="xsd:string"/>
  </xsd:complexType>

<xsd:element name="Azimuth"> <xsd:simpleType> <xsd:restriction base="xsd:double"> <xsd:minInclusive value="0" /> <xsd:maxInclusive value="360" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:schema>
The xml file also contains this element and fills it with a value,
leading to the following xml implementation:
<?xml version="1.0" encoding="UTF-8"?>
<Process name="Pizza Order" timeNeeded="2">
        <Azimuth>2.2</Azimuth>
        <Process name="Select Pizza Service">
                <Activity name="Browse Yellow Pages" efficiency="5" />
                <Activity name="Search Google" efficiency="10" />
        </Process>
        <Process name="Order">
                <Activity name="Dial phone number" />
                <Activity name="Select pizzas" />
                <Activity name="Provide address" />
        </Process>
        <Activity name="Wait for Delivery" />
        <Process name="Receipt and Payment">
                <Activity name="Pay delivery"/>
                <Activity name="Pay tip"/>
        </Process>
</Process>

The result in topbraid contains an owl "schema" shows the Azimuth as a
class. Also an instance of Azimuth is created in the RDF-file, but the
value 2.2 I would expect somewhere in this instance is gone. Further
more the class Azimuth is a subbclass with a restriction "rdf:value only
AzimuthDataType". And this AzimuthDataType is a subClassOf xsd:double.
Why is this AzimuthDataType class created? The restrictions on the Azimuth element I can't find either.
Can you explain why I miss things?

Another thing I like to point out is the behavior even visible in your
original example is that the subelements named "Process" of type
ProcessType will be shown as instances of class Process and not of class
ProcessType what I would expect.
Kind regards,
Pim

________________________________

From: [email protected]
[mailto:[email protected]] On Behalf Of Scott
Henninger
Sent: maandag 4 januari 2010 19:12
To: [email protected]
Subject: Re: [tbc-users] Missing xml values


Pim; I think we'll need more information about the specifics of your XML
files and schemas to help out.

In the meantime, I've included an XML schema and instance file from our
Help files that may help understand how the general feature works.  Open
Import... > OWL Files from XML Schemas, add the schema file, add the
instance file(s) and Finish.  The schema will be translated to an .owl
file and the instance(s) to .rdf files.  Import the instance files into
the schema file in RDF/OWL and the instance will appear in the proper
class definitions (where an element/type definition in the schema is
translated into a class).

More information about this can be found at > Import and Export > Import
external information > Import XML

-- Scott

Helm, P.W. (Pim) van den wrote:
        I am a newbee to topbraid, and tried to create an ontology from
a xsd schema and directly create an ontology from an xml file relying on
this schema. Via the import owl files from xml schema's I succeded in
this task.
I received two files one is the "schema" ontology and the other
the "model/instances" ontology. Although this is what I hoped for, the
xml document has a large number of values (coordinates) that I can't
find in the created "model/instances" ontology. Can anyone tell me what I am doing wrong? Or is my expectations
of this import incorrect. I would also like to note that using a large
gbXML model seems to result in an infinite loop. Was running for hours
without results.
I do notice the schema ontology does contain a
CoordinateDatatype that is a subclassof decimal. So it should be
possible to store the value.
Kind regards,
        Pim van den Helm
This e-mail and its contents are subject to the DISCLAIMER at
http://www.tno.nl/disclaimer/email.html
        --

        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.
        

--

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.

This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html

--

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.



-- 
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