Thank you Gokhan,

I have some follow up questions. I was able to open an xml with TopBraid 
Semantic XML and create and save ontology from it. I had one issue and one 
question though.

1. There are a lot of attributes in my original xml but only two have been 
created during the conversion process (class-context and title-Section show 
below). According to the xml demo on the website, all original xml attributes 
should have been created as data type properties. I tried 3.6 as well and had 
the same issue.

2. I carefully removed unwanted braches of elements (classes) from my ontology. 
I then grouped all remaining classes under Mgrep class shown in the screenshot 
below.
I was expecting, during the mass import process of the xml instances to the 
created ontology, all the elements that do not have an equivalent class in the 
ontology be dropped, but they didn't. They are shown with a prefix p20Note in 
my ontology. Is there a way to drop those elements during the mass import 
process?

Thanks!
Sina

[cid:[email protected]]                                      
[cid:[email protected]]

From: [email protected] [mailto:[email protected]] 
On Behalf Of Gokhan Soydan
Sent: Wednesday, January 25, 2012 8:39 PM
To: [email protected]
Subject: Re: [topbraid-users] semantic xml - importing xml instances

Hello Sina,

In 3.5.x and earlier versions of TBC, there is basic support for customized 
mapping from XML to RDF using the underlying classes and properties. However 
those classes and properties should be decorated with SXML annotation 
properties. You need to import sxml.rdf into your ontology from 
TopBraid/TBC/sxml.rdf .

Classes should have a value for sxml:element property, which specifies the 
element QName in XML to import. For example, in Turtle format, a class called 
product:Shirt would use the property like this:

product:Shirt
      a owl:Class ;
      sxml:element "product:shirt" .

The above triple enables XML instances with the element tag "product:shirt" to 
mapped into instances of product:Shirt in the ontology.

OWL datatype properties are used in customized mapping of attributes. Datatype 
property should have values for sxml:attribute property, which specifies the 
attribute name in XML to import. For example, in Turtle format, a datatype 
property called product:id would use sxml:attribute like this:

product:id
      a       owl:DatatypeProperty ;
      sxml:attribute "product:id" .

There are two ways of applying the customized mapping to your XML file. You can 
either:
1-) Import the XML file as an import using Imports View of the ontology with 
customized mapping classes and properties.
2-) Create a SPARQLMotion script with sml:ImportXMLFile module to import the 
XML file, sml:ImportRDFFromWorkspace to import the ontology with customized 
mapping classes and properties, and connect them to sml:ConvertXMLToRDF module 
to do the customized mapping from XML to RDF triples.

There is some information in the Help page at:
TopBraid Composer<../../../nav/2> > Import and Export ><../../../nav/2_4> 
Creating, Importing, Querying, Saving XML documents with Semantic XML

In 3.6, children elements in complex contents will be mapped as OWL object 
properties, simple contents will be mapped as datatype properties, there will 
be support for enumerations and much more. You will have a way of specifying 
the ontology to use for customized mapping of an XML file (or this can be a 
setting for the project or the workspace) in a wizard.

There will also be more detailed documentation for customized mappings 
involving SXML in the upcoming TopBraid Composer releases.

Gokhan


On 1/25/2012 9:20 AM, Madani,Sina wrote:
Hi,

TopBraid semantic xml feature converted an xml instance elements and attributes 
into classes and properties. Now, I want to use this ontology as the Tbox, 
remove some unwanted classes/properties (elements/attributes) and import 
hundreds of xml files as instances for this Tbox. There is no schema involved. 
I played with xml import function but every time it creates a separate file 
instead of adding it into my Tbox.
Where can I get more information about TopBriad semantic xml? The help section 
on this is very brief.

Thanks for the help!
Sina
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
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-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
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-users?hl=en

<<inline: image001.png>>

<<inline: image002.png>>

Reply via email to