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