Leonard, When you say UPDATE, I would suggest having some caution when using queries that may potentially "modify" the XML file. Probably your intention is not to modify your XML file, so there are two choices: either import the XML file into another ontology and then run CONSTRUCT queries to map your triples (or use SPINMap) or use a "process" (schema) ontology to drive the import, so the instances from your XML file are mapped to your desired type as the import happens. More on the process ontologies are found in TopBraid Composer Help under: TopBraid Composer > Working with XML > Creating, Importing, Querying, Saving XML documents with Semantic XML and TopBraid Composer > Working with XML > XSD to OWL Importer
The examples in both help pages give an idea on how process ontologies work. Gokhan On Thu, Sep 27, 2012 at 2:27 PM, Leonard Jacuzzo <[email protected]> wrote: > Thanks Scott, > > What I am wondering is how to use class names that have periods in them. > My XML has nodes like 'edu.may.cor.token'. So the classes and properties > have that sort of name, which makes it impossible to use them in a SPARQL > query. > > Gokhan had suggested using BIND. So I was going to query for all class > names and BIND them as resources with smf:resource. > > After that I want to eliminate the names of the classses and replace them > with the resources. > > Thus, I can use SPARQL to find the data I need in the file that I > imported. > > That is why I asked if I should use UPDATE for that part of my plan. > > Best, > LFJ > > On Thu, Sep 27, 2012 at 4:14 PM, Scott Henninger < > [email protected]> wrote: > >> Leonard; BIND simply introduced a variable into the graph pattern. >> You can use that variable either in the WHERE clause or any other >> clause, such as INSERT, DELETE, and CONSTRUCT. >> >> -- Scott >> >> On Sep 27, 2:16 pm, Leonard Jacuzzo <[email protected]> wrote: >> > Thanks Gokhan, >> > >> > Would I embed that BIND in an UPDATE query to take advantage of the >> results? >> > >> > Best, >> > LFJ >> > >> > On Wed, Sep 26, 2012 at 6:17 PM, Gokhan Soydan <[email protected] >> >wrote: >> > >> > >> > >> > >> > >> > >> > >> > > Leonard, >> > >> > > Here are the answers: >> > >> > > Hi List, >> > >> > >> I was happy to discover how easy it is to import an XML file and >> convert >> > >> it to RDF. >> > >> > >> I have two questions. >> > >> > >> First, is there an easy way to understand how the RDF relates to the >> XML? >> > >> I am having trouble figuring out the graph so that I can extract the >> things >> > >> that I need via SPARQL. >> > >> > > I would suggest looking at TopBraid Composer > Working with XML > >> > > Creating, Importing, Querying, Saving XML documents with Semantic XML >> from >> > > TopBraid Composer help. (The location might be slightly different in >> an >> > > earlier version of TopBraid Composer). One easy way to see the >> imported >> > > instances is right-clicking on "composite:child" at Properties View >> and >> > > select "Show in Associations View", which will show a tree structure >> > > similar to the structure in the XML file. >> > >> > >> Second, the file, which was imported, results in class and property >> names >> > >> that contain periods, as in 'edu.mayo.bmi.umia.refsem.token'.... >> > >> > >> When I attempt to use those names in a SPARQL query, the syntax >> checker >> > >> complains about the periods. Is there a work around for that, othe >> than >> > >> manually changing all of the names? >> > >> > > You could build resource names using them. You can use BIND functions >> to >> > > do that as in the following: >> > >> > > BIND( IRI( " >> http://edu.mayo.bmi.umia.refsem.token#myExampleXMLResource<http://edu.mayo.bmi.umia.refsem.token/#myExampleXMLResource> >> <http://edu.mayo.bmi.umia.refsem.token/#myExampleXMLResource>" >> > > ) AS ?resource ) >> > >> > > or (sometimes IRI() may not work, then use the following) >> > >> > > BIND( smf:resource( " >> > >http://edu.mayo.bmi.umia.refsem.token#myExampleXMLResource<http://edu.mayo.bmi.umia.refsem.token/#myExampleXMLResource> >> <http://edu.mayo.bmi.umia.refsem.token/#myExampleXMLResource>" >> > > ) AS ?resource ) >> > >> > > Gokhan >> > >> > >> Any help will be fantastic. >> > >> > >> Best, >> > >> Leonard >> > >> > >> -- >> > >> -- 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, SPARQL Web Pages 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, SPARQL Web Pages 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, SPARQL Web Pages 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, SPARQL Web Pages 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, SPARQL Web Pages 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
