Google Groups Home
Help | Sign in
error when using Apply/Filter By Construct.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
donundeen  
View profile
 More options Jul 16, 4:50 pm
From: donundeen <donund...@gmail.com>
Date: Wed, 16 Jul 2008 13:50:29 -0700 (PDT)
Local: Wed, Jul 16 2008 4:50 pm
Subject: error when using Apply/Filter By Construct.
Hi,
I'm working on a little SPARQLMotion script to send location
information to google, get back lat,long data, and add that
information back into my triple store.

I'm not really sure what I'm doing, but this seems like a pretty good
sample app to figure this stuff out.
Anyways, I'm getting this error message, which is probably a result of
something dumb on my part:

my console output when I run the query is:
16:43:16.509: Compiling script...
16:43:16.509: Executing script...
16:43:16.509:   - IterateOverSelect_2
16:43:16.509:   - ImportSesameRemoteRepository_2
16:43:17.806:     - ImportXMLFromURL_2
16:43:17.915:     - ConvertXMLToRDF_1
16:43:17.931:     - ApplyConstruct_1
Failed to execute SPARQLMotion script:
com.hp.hpl.jena.query.QueryParseException: Line 1, column 12: rethrew:
com.hp.hpl.jena.iri.impl.IRIImplException: Error: 0/ILLEGAL_CHARACTER
in slot 15
Error: com.hp.hpl.jena.query.QueryParseException: Line 1, column 12:
rethrew: com.hp.hpl.jena.iri.impl.IRIImplException: Error: 0/
ILLEGAL_CHARACTER in slot 15

My Construct query is:
CONSTRUCT {?x <http://topbraid.org/sxml#text> ?z} WHERE {?x <http://
topbraid.org/sxml#text> ?z}
is there anything obviously wrong here?

could that above error be caused not by the query , but the xml data
being returned by google?

 -- I'm trying to attach the source of the script, but I cant' figure
out how to generate the n3 source of the entire script. how is that
done?

attached below is my script code:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Henninger  
View profile
 More options Jul 16, 5:36 pm
From: Scott Henninger <shennin...@topquadrant.com>
Date: Wed, 16 Jul 2008 14:36:12 -0700 (PDT)
Local: Wed, Jul 16 2008 5:36 pm
Subject: Re: error when using Apply/Filter By Construct.
Don;  I don't see anything obviously wrong with the script.  Is there
really a newline after the 'http://'?  That would be a problem.  For
the sake of my own sanity, I usually use a format such as:
CONSTRUCT {?x <http://topbraid.org/sxml#text> ?z}
WHERE {?x <http://topbraid.org/sxml#text> ?z .

}

This is an OK query.  The query replicates triples, so using it in
FilterByConstruct makes sense.

To export a file to N3, choose the file in the Navigator, choose
Export and Export/Merge/Convert RDF Graphs, then in the "Export into
format" pull-down, choose N3.

-- Scott

On Jul 16, 3:50 pm, donundeen <donund...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
donundeen  
View profile
 More options Jul 17, 9:53 am
From: donundeen <donund...@gmail.com>
Date: Thu, 17 Jul 2008 06:53:50 -0700 (PDT)
Local: Thurs, Jul 17 2008 9:53 am
Subject: Re: error when using Apply/Filter By Construct.
ok, thanks for the export info. Here's the portion of that file that
describes the script:

- even without explaining how my script caused the error, can you tell
me what the error even means?

thanks!

# Saved by TopBraid on Thu Jul 17 09:46:25 EDT 2008
# baseURI: http://www.owl-ontologies.com/MulgaraConnect/main
# imports: http://topbraid.org/sparqlmotionlib
# imports: http://topbraid.org/sparqlmotion
# imports: file:/C:/Documents%20and%20Settings/undeed/TBC-ME-workspace/
MulgaraConnect/cidoc_v4.2.rdfs
# imports: http://my.com/sesameRepository/
# imports: http://www.topbraidcomposer.org/owl/2006/07/tbcgeo.owl

@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix vocab2:  <http://metmuseum.org/rdf/vocab/#> .
@prefix sml:     <http://topbraid.org/sparqlmotionlib#> .
@prefix sm:      <http://topbraid.org/sparqlmotion#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix :        <http://www.owl-ontologies.com/MulgaraConnect/
main#> .

:ImportSesameRemoteRepository_2
      a       sml:ImportSesameRemoteRepository ;
      sm:next :IterateOverSelect_2 ;
      sml:modelName "mulgaraTms"^^xsd:string ;
      sml:url "http://localhost:8280/openrdf-sesame"^^xsd:string .

:IterateOverSelect_2
      a       sml:IterateOverSelect ;
      sm:body :ImportXMLFromURL_2 ;
      sml:selectQuery """SELECT
?object ?city ?state ?country
WHERE
{ ?objGeo vocab2:ObjGeography_ObjectID ?object .
?objGeo vocab2:ObjGeography_City ?city .
?objGeo vocab2:ObjGeography_State ?state .
?objGeo vocab2:ObjGeography_Country ?country
 }
LIMIT 5
"""^^xsd:string .

:ImportXMLFromURL_2
      a       sml:ImportXMLFromURL ;
      sm:next :ConvertXMLToRDF_1 ;
      sm:outputVariable "xml" ;
      sml:url "http://maps.google.com/maps/geo?q={?city}%2C{?state}
%2C{?country}&output=xml&key=ABQIAAAAQ0Xdnw-
manNYwhM7BUqwDRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQ5p82kuCYkyZhxHbH8CbJ5BkNaEw"^^x sd:string .

:ConvertXMLToRDF_1
      a       sml:ConvertXMLToRDF ;
      sm:next :ApplyConstruct_1 ;
      sml:baseURI "http://metmuseum.org/rdf/google#"^^xsd:string .

:ApplyConstruct_1
      a       sml:ApplyConstruct ;
      sml:constructQuery """CONSTRUCT {?x <http://topbraid.org/
sxml#text> ?z}
WHERE {?x <http://topbraid.org/sxml#text> ?z . }"""^^xsd:string ;
      sml:replace "true"^^xsd:boolean .

On Jul 16, 5:36 pm, Scott Henninger <shennin...@topquadrant.com>
wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Henninger  
View profile
 More options Jul 17, 3:47 pm
From: Scott Henninger <shennin...@topquadrant.com>
Date: Thu, 17 Jul 2008 12:47:46 -0700 (PDT)
Local: Thurs, Jul 17 2008 3:47 pm
Subject: Re: error when using Apply/Filter By Construct.
Don;  I think the error is as it says.  There is an "illegal
character" in the query.  But I can't reproduce the error, so there is
not much more I can say.

-- Scott

On Jul 17, 8:53 am, donundeen <donund...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
donundeen  
View profile
 More options Jul 17, 4:15 pm
From: donundeen <donund...@gmail.com>
Date: Thu, 17 Jul 2008 13:15:22 -0700 (PDT)
Local: Thurs, Jul 17 2008 4:15 pm
Subject: Re: error when using Apply/Filter By Construct.
I finally found the error, when I exported the script code to n3 and
tried to load it in TBC

I had a namespace with two #'s in a row.

this happened because in my ConvertXMLToRDF module, for a BaseURI, i
specified:
http://metmuseum.org/rdf/google#
, and apparently the module adds a # for you, so I had two in a row.

in any case, it seems like I could have got a better warning of that
behaviour than "Error: 0/ILLEGAL_CHARACTER
in slot 15 ", since that message is basically meaningless.

but, all better now!

On Jul 17, 3:47 pm, Scott Henninger <shennin...@topquadrant.com>
wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google