On the related topic, note that XSD and XML import capabilities were enhanced for 3.6 beta. For more information, please see this blog: http://topquadrantblog.blogspot.com/2011/09/living-in-xml-and-owl-world.html
Irene Polikoff From: [email protected] [mailto:[email protected]] On Behalf Of Madani,Sina Sent: Monday, February 27, 2012 4:14 PM To: [email protected] Subject: RE: [topbraid-users] semantic xml - importing xml instances Thank you very much Scott for the prompt reply. I re-examined my xml file and there was a problem in it. All attributes are now being imported into the ontology , my apology. In terms of unwanted elements, I'll definitely take a look at SPARQLMotion but it may be easier to pre-process and get rid of unwanted elements before instances get into the ontology. Thanks again Sina From: [email protected] [mailto:[email protected]] On Behalf Of Scott Henninger Sent: Monday, February 27, 2012 2:25 PM To: [email protected] Subject: Re: [topbraid-users] semantic xml - importing xml instances Sina; Could you provide an example of the XML where the attributes are dropped during import? You can use [email protected] if posting here is not appropriate. In terms of dropping unwanted elements, the XML importer will get all XML elements, per the Semantic XML profile. It is expected that post-processing will be necessary, and that is what SPARQLMotion is designed for. SPARQL and SPIN are also invaluable tools for such transformations. -- Scott On Feb 27, 2012, at 11:45 AM, "Madani,Sina" <[email protected]> wrote: 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 <image001.png> <image002.png> 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 > Import and Export > 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 -- 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 -- 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 -- 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 -- 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
