Hi Scott,

Any SPARQLMotion module or script can generate RDF triples as output.  
You can treat this output as a "virtual" triple source by turning it  
into an .smg file. In TBC, right-click on any module of your script in  
the graph view and select "Generate importable .smg file". This will  
prompt you to specify a base URI and then create a file with the same  
file name + .smg in your workspace. This file can now be imported like  
any other RDF file or database into other OWL/RDF models.

In other words, you can encapsulate any transformation pipeline and  
have it conveniently available like a virtual triple source. At load  
time, the SM script will execute to compute the up-to-date results.

Holger


On Nov 6, 2008, at 9:29 AM, Scott Henninger wrote:

> Holger, I'm not familiar with .smg files.
> -- Scott
>
> Holger Knublauch wrote:
>>
>> Hi Don,
>>
>> yes Semantic XML by default only creates string values, because
>> without an XSD there is no way of knowing a better type. However,
>> Semantic XML is basically intended to be a first step, like a
>> canonical translation so that you at least have them in RDF. In many
>> scenarios, users may want to place additional transformation steps
>> afterwards, e.g. using SPARQL construct statements in SPARQLMotion
>> scripts. Then you are free to map those to any other data structure  
>> of
>> your choice and make "manual" changes such as datatype conversions.
>> You can even treat the result of any SPARQLMotion script as another
>> RDF graph (and save it as an .smg file that you can then import by  
>> its
>> own base URI. This way, the original XML is merely the raw starting
>> point of a processing pipeline into whatever format you like.
>>
>> The upcoming 3.0 alpha and beta releases will also include various
>> Semantic XML bug fixes and improvements.
>>
>> Holger
>>
>>
>> On Nov 6, 2008, at 8:15 AM, donundeen wrote:
>>
>>
>>> Hi Dave,
>>> I just did a little presentation on representing XML as RDF/OWL,  
>>> using
>>> Semantic XML, which Scott mentioned.
>>>
>>> The way I summed up the process was:
>>> 1. Element NAMES in the xml become CLASSES in rdf/owl
>>> 2. Individual Elements become INSTANCES of those classes
>>> 3. child node relationships are represented as a composite:child
>>> property, connecting the instance of the parent to the intance of  
>>> the
>>> child.
>>> 4. attributes become properties, which point to the literal value.
>>> 5. Text Nodes in the XML become instances of sxml:textNode, and they
>>> have a property sxml:text that points to the literal text string.
>>>
>>> All this is done for you with Semantic XML, but it's nice to know  
>>> the
>>> process, and this is probably easier than writing the xslt to do it.
>>>
>>> In the above process, no notice is taken of any schema, so all the
>>> data is string type, I think. I'd imagine going the "Import -> OWL
>>> Files from XML Schemas" would handle that part better, but I haven't
>>> gone that route yet.
>>>
>>>
>>> in terms of going from the OWL to RDB, I'd imagine the process would
>>> be something like.
>>> 1. CLASSES become TABLES
>>> 2. Instances become rows in those tables. You'd probably need a  
>>> way to
>>> turn the long URI identifiers into integer keys that are easier to
>>> index.
>>> 2. Object Properties (properties connecting instances of classes)
>>> become foreign keys.
>>> 3. Datatype properties (properties connecting instances to literals)
>>> become columns in those tables.
>>>
>>> Those steps, you don't get from any app I know of offhand, but it
>>> doesn't seem too difficult to implement in an elementary sense. I  
>>> know
>>> I plan on doing this, when it comes to exporting my rdf data for use
>>> in a web-app that needs better performance.
>>>
>>> if you used semantic XML, and didn't get any data types from some
>>> original schema, I guess all your columns except the foreign keys
>>> would be string types. I haven't played with the importing OWL from
>>> xml schema stuff, but I'd imagine that would help introduce data  
>>> types
>>> there.
>>>
>>> best of luck. If I get any work done along these lines, I'll be sure
>>> to post it.
>>>
>>> don
>>>
>>>
>>>
>>> On Nov 4, 2:04 pm, Scott Henninger <[EMAIL PROTECTED]>  
>>> wrote:
>>>
>>>> Dave;  In terms of converting an XML file into an OWL file, TBC  
>>>> has a
>>>> couple of options.  The first is Semantic XML.  You can open any  
>>>> XML
>>>> file with TBC.  Put the XML file in the workspace and Open With ->
>>>> TopBraid).  The file you enclosed, for example, opens as an OWL
>>>> ontology with, amongst many other things, 80 instances of  
>>>> addressA2EA
>>>> type.  There is a description of the mapping in the Help files at
>>>> TopBraid Composer > Import and Export.
>>>>
>>>> The second is to import XML schema and instances files.  This is  
>>>> done
>>>> through Import -> OWL Files from XML Schemas.  Again, more
>>>> information
>>>> on how this works can be found in the TopBraid Composer > Import  
>>>> and
>>>> Export Help files.
>>>>
>>>> I am less clear on the issue of then moving the data to a  
>>>> relational
>>>> database.  Once in OWL (RDF triples), there are various RDF stores
>>>> that can be used to provide common access to the data.  Sesame,  
>>>> Jena,
>>>> Allegro, and Oracle11g are amongst those.  Converting RDF/OWL to a
>>>> relational datastore, a kind of reverse-D2RQ, is not something I am
>>>> familiar with.
>>>>
>>>> On Nov 4, 12:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>  
>>>> wrote:
>>>>
>>>>
>>>>> Hi Jeff,
>>>>>
>>>>> Many thanks for your suggestion but I don't know how the XSLT is
>>>>> setup /
>>>>> coded to transform a simple XML file to an OWL file.
>>>>>
>>>>> Here is a sample file attached. Maybe you can have a better idea
>>>>> what I'm
>>>>> trying to do.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Dave
>>>>> On Nov 4, 5:23 pm, "Schmitz, Jeffrey A"
>>>>> <[EMAIL PROTECTED]>
>>>>> wrote:> Hi Dave,
>>>>>
>>>>>>    RDF/XML is the name of an XML format in which OWL can be fully
>>>>>>
>>>>> expressed.  (Other, non-XML based formats in which OWL model can  
>>>>> be
>>>>> expressed are Turtle and N3).
>>>>>
>>>>>>    You could certainly run an XSLT script as a scheduled script.
>>>>>>
>>>>>>    However, importing an OWL model into an RDBMS that would be
>>>>>> easily
>>>>>>
>>>>> usable by other, non-OWL applications I think would be the hard
>>>>> part, but
>>>>> perhaps there are some solutions for this out there too?
>>>>>
>>>>>> Jeff
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>>>>> Sent: Tuesday, November 04, 2008 11:06 AM
>>>>>> To: TopBraid Composer Users
>>>>>> Subject: [tbc-users] Re: automatic XML to OWL transformation
>>>>>>
>>>>>> Hi Jeff,
>>>>>>
>>>>>> I'm trying to go from XML to OWL, not RDF.
>>>>>>
>>>>>> I'm looking for a slolution I can run as a script (e.g a
>>>>>> scheduled script
>>>>>>
>>>>> that does the job via Linux crontab).
>>>>>
>>>>>> Possibly to merge XMLs, transform them to OWL then import to an
>>>>>> RDBMS.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Dave.
>>>>>>
>>>>>> On Nov 4, 4:17 pm, "Schmitz, Jeffrey A"
>>>>>> <[EMAIL PROTECTED]>
>>>>>> wrote:
>>>>>>
>>>>>>> I've not looked too hard for pre-built solutions, but we just
>>>>>>> use xslt
>>>>>>> to tranform xml to rdf/xml and it's usually pretty simple and we
>>>>>>> get a
>>>>>>> lot more control of exactly how the transform occurs than you
>>>>>>> would
>>>>>>> probably get in a "pre-built" solution.
>>>>>>>
>>>>>>> As for "importing into a relational database", if you're talking
>>>>>>> about
>>>>>>> importing the rdf/xml, jena or TBC will do that for you
>>>>>>> automatically.
>>>>>>> However, the schema they use is not really usuable for external
>>>>>>> non-RDF applications.
>>>>>>>
>>>>>>> Jeff
>>>>>>>
>>>>>>> ________________________________
>>>>>>>
>>>>>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>>>>>> Sent: Tuesday, November 04, 2008 10:09 AM
>>>>>>> To: [email protected]
>>>>>>> Subject: [tbc-users] automatic XML to OWL transformation
>>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I'm working on a project; trying to transform cXML/XML files to
>>>>>>> OWL
>>>>>>> then import them to a relational database for easy sharing by
>>>>>>> SQL run
>>>>>>> from different applications?
>>>>>>>
>>>>>>> Does anyone know the best method I can use to automatically
>>>>>>> transform
>>>>>>> a cXML file to OWL file? Is there any tool in LINUX or Windows
>>>>>>> that
>>>>>>> exists for doing that?
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>> Dave
>>>>>>>
>>>>>  UTRAN-SNAP_exampl.xml
>>>>> 182KViewDownload
>>>>>
>>
>>
>>
>>
>
> >


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