Tim,

Yes, the issue seems to be with the baseURI. It ends with "...xml#Class1". The "#" character is associated with a namespace, not a baseURI, so TBC got confused. As you figured it out, fixing the baseURI fixes the issue.

At the other hand, it is still OK to have "file:/", although this may issue too many warnings. We will have better URIs generated by the importer sometime in the future.

Gokhan


On 12/14/2011 6:22 AM, Tim Smith wrote:
Once last piece to the puzzle:

As indicated below, I used the schema import wizard to map the base URI of the xml schema file to a new URI. However, the wizard did not allow me to map the xml instance file base URI to something else. This meant that the instance file created in TBC has a base URI of the form:

file:/C:/Users/me/Documents/Projects/proj1/Data%20Model/SIM/GetResultExample.xml#Class1

This did not inhibit using SPARQL queries against the file even though the URIs of the instances were of the form above.

However, as I stated below I thought the "file:/..." URI was not valid. This was confirmed when I attempted to open the instance file using TBE. TBE immediately indicated that the base URI was not valid and refused to load the file.

Tim


On Wed, Dec 14, 2011 at 9:02 AM, Tim Smith <smith.ts...@gmail.com <mailto:smith.ts...@gmail.com>> wrote:

    Hi Gokhan,

    Thanks for your response!

    I tried the import again, this time changing the Namespace mapping
    via the wizard and the problem has gone away.

    The first time I selected the instance and schema file and clicked
    "finish".  This used the file name & location as the default
    namespace and base URI resulting in URIs of the form:

    
file:/C:/Users/me/Documents/Projects/proj1/Data%20Model/SIM/GetResultExample.xml#Class1


    TBC recognized these and the SPARQL editor did not indicate an
    error in the query.

    During the second import I changed the namespace to:

    http://ontologies.pg.com/pd/getresult#

    Upon making this change, SPARQL queries now work as expected.

    I suspect the "file:/C:..." namespace does not follow URI
    standards but I don't know the standard well enough to explain why.

    Tim




    On Tue, Dec 13, 2011 at 10:51 PM, Gokhan Soydan
    <gsoy...@topquadrant.com <mailto:gsoy...@topquadrant.com>> wrote:

        Hello Tim,

        First of all, we will have a lot improvements in Import XML
        Schemas and Instance Files Wizard in 3.6.0. Actually, it will
        be renamed as Import XML Schemas wizard, and you will be able
        to use our Semantic XML (SXML) feature to map XML files into
        RDF/OWL triples using the imported schema.

        It is strange that you don't get any results to your SPARQL
        queries. Can you send me some examples or the files offline
        maybe, so I could have a look?

        Gokhan



        On 12/13/2011 6:57 PM, Tim Smith wrote:

            Hi,

            I imported an xsd and associated xml file into TBC using
            the Import XML Schemas and Instance Files Wizard.  This
            created two .ttl files. The file created from the .xml
            file imports the model and contains the instances as
            expected.  I can see all the classes and properties in
            their respective views.

            However, SPARQL queries do not return results.

            Specifically, I can query for subclass relationships (?s
            rdfs:subClassOf ?c) and proper results are returned IF ?c
            is owl:Thing.  If it is a class that was created by the
            import wizard, no results are returned.  In addition, if I
            query using properties created during import such as ?s
            p1:name ?o, no results are returned.

            In all of these cases I can clearly see that the triples
            exist since instances are displayed in the instance view
            and the form view for each instance.  The SPARQL query
            editor does not display any errors and appears to execute
            the query but no results are returned.

            I've never seen a situation like this.  I suspect I've
            missed something in the import.

            Any ideas?

            Thanks,

            Tim

-- 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
            topbraid-users@googlegroups.com
            <mailto:topbraid-users@googlegroups.com>
            To unsubscribe from this group, send email to
            topbraid-users+unsubscr...@googlegroups.com
            <mailto:topbraid-users%2bunsubscr...@googlegroups.com>
            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
        topbraid-users@googlegroups.com
        <mailto:topbraid-users@googlegroups.com>
        To unsubscribe from this group, send email to
        topbraid-users+unsubscr...@googlegroups.com
        <mailto:topbraid-users%2bunsubscr...@googlegroups.com>
        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
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
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
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to