unrecognized prefix error in WebConsole

0 views
Skip to first unread message

jrh...@thematix.com

unread,
Apr 30, 2015, 5:52:40 PM4/30/15
to sta...@clarkparsia.com
I am executing the following query in the WebConsole (which also fails and returns no result in my Javascript code):

SELECT DISTINCT ?p ?o WHERE { GRAPH ?g { fibo-fnd-acc-aeq:Capital ?p ?o}}

The prefix fibo-fnd-acc-aeq is defined in my database -


The following query works and returns the proper result:

SELECT DISTINCT ?p ?o WHERE {GRAPH ?g {fibo-fnd-acc-aeq:Capital ?p ?o}}

I assumed from reading the documentation that Stardog would expand any prefix that was registered in namespaces to the full URL.

Moreover, in the WebConsole query prefix pane, these fibo- prefixes do not show up when I try to add them, although sm, purl and skos do show up, and they were added to the namespace at the same time as the ones starting with fibo-.
Is it possible that the hyphens are causing a problem? They are legal in XML namespace prefixes. What else might be causing the problem?

I was hoping to avoid having to submit dozens of PREFIX statements in my SPARQL queries that are executed from Javascript code.

Edgar Rodriguez

unread,
May 1, 2015, 5:53:48 PM5/1/15
to sta...@clarkparsia.com
Which version of stardog are you using?

I'm not able to reproduce this using the latest version of stardog (3.0.1). I tried to reproduce it with the example app in the stardog.js repo [1], changing the database in the query route handler [2] to `nodeDBReasoning` included in the repo [3], and sending queries to that endpoint using the `ex` prefix [4], specifically:

select * where { ?s a ex:Car }

I tried changing the prefix to `ex-1` and it works as well.

I wasn't able to reproduce in the web console either.

[2] https://github.com/Complexible/stardog.js/blob/develop/examples/express-app/index.js#L56
[3] https://github.com/Complexible/stardog.js/blob/develop/load_test_data.sh#L9
[4] https://github.com/Complexible/stardog.js/blob/develop/data/reasoning/abox.ttl#L4

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

jrh...@thematix.com

unread,
May 4, 2015, 12:01:27 AM5/4/15
to sta...@clarkparsia.com
I am using 3.0.1.
Let me try some simple cases to see if I can isolate the problem more.
Jim

jrh...@thematix.com

unread,
May 5, 2015, 2:34:58 PM5/5/15
to sta...@clarkparsia.com
On careful inspection, I discovered that a couple of the namespace bindings were malformed (missing the colon after http). The one that I was using in the query was NOT malformed.
I edited the other two bindings that were malformed and now the query works properly. Any idea why malformed namespace bindings would cause a perfectly good namespace binding to be ignored?
Jim

On Thursday, April 30, 2015 at 2:52:40 PM UTC-7, jrh...@thematix.com wrote:
Reply all
Reply to author
Forward
0 new messages