Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7672247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:14:31+00:00 2026-05-31T16:14:31+00:00

I am trying to build correct query for my test server, and i am

  • 0

I am trying to build correct query for my test server, and i am faced the problem that i’m not able to define PREFIX.

For instance, this query works:

select * where
{
   ?stayingURL <http://localhost/resource_lng> ?lng .
   ?stayingURL <http://localhost/resource_staying_date> ?date .
   ?stayingURL <http://localhost/resource_address> ?address .
}
LIMIT 100

I try to add filter by date, just like that:

select * where
{
   ?stayingURL <http://localhost/resource_lng> ?lng .
   ?stayingURL <http://localhost/resource_staying_date> ?date .
   ?stayingURL <http://localhost/resource_address> ?address .
   FILTER (?date > "2012-01-01"^^xsd:date)
}
LIMIT 100

Now i got the following error: “MALFORMED QUERY: org.openrdf.query.parser.sparql.ast.VisitorException: QName 'xsd:date' uses an undefined prefix“

OK, i try to declare this prefix manually by adding the following line to the start of query:

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

Now i got this error:

MALFORMED QUERY: Encountered " "<" "< "" at line 1, column 14.
 Was expecting:
 <Q_IRI_REF> ...

This is pretty strange for me, but anyway i tried to write it directly, without any prefix:

select * where
{
 ?stayingURL <http://localhost/resource_lng> ?lng .
 ?stayingURL <http://localhost/resource_staying_date> ?date .
 ?stayingURL <http://localhost/resource_address> ?address .
 FILTER (?date > "2012-01-01"^^<http://www.w3.org/2001/XMLSchema#date> )
 }
LIMIT 100

Result is almost the same:

MALFORMED QUERY: Encountered " "<" "< "" at line 1, column 228.
Was expecting one of:
    <Q_IRI_REF> ...
    <PNAME_NS> ...
    <PNAME_LN> ...

What am I doing wrong?

Here’s my server address: http://176.34.226.101:8080/openrdf-sesame/repositories/ecomobile .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:14:32+00:00Added an answer on May 31, 2026 at 4:14 pm

    It works for me if I URI encode all the query parameter:

    PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
    select * where
    {
     ?stayingURL <http://localhost/resource_lng> ?lng .
     ?stayingURL <http://localhost/resource_staying_date> ?date .
     ?stayingURL <http://localhost/resource_address> ?address .
     FILTER (?date > "2012-01-01"^^<http://www.w3.org/2001/XMLSchema#date> )
     }
    LIMIT 100
    

    This would be the request:

    http://176.34.226.101:8080/openrdf-sesame/repositories/ecomobile?query=PREFIX%20xsd%3A%20%3Chttp%3A//www.w3.org/2001/XMLSchema%23%3E%20select%20%2A%20where%7B%20%20%20%3FstayingURL%20%3Chttp%3A//localhost/resource_lng%3E%20%3Flng%20.%20%20%20%3FstayingURL%20%3Chttp%3A//localhost/resource_staying_date%3E%20%3Fdate%20.%20%20%20%3FstayingURL%20%3Chttp%3A//localhost/resource_address%3E%20%3Faddress%20.%20%20%20FILTER%20%28%3Fdate%20%3E%20%222012-01-01%22%5E%5Exsd%3Adate%29%7DLIMIT%20100

    Apologies for the cryptic unreadable URI … a shorten version here:

    http://bit.ly/xTQhSV

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write Linq query on this Products table based on FacetTypes that
I have a std::vector< tr1::shared_ptr<mapObject> > that I'm trying build from data contained in
I've been trying to build a pepXML to mzIdentML converter and using this validator
I'm trying to build a Silverlight App that accesses and presents data from a
I am trying to write a Facebook query that will return all comments posted
I'm trying to build and app that shows organized data so I'm thinking that
I'm trying to get a query going that will search multiple tags. The tags
I am trying to build a search page and alignment is correct between search
I am trying to build a query for fetching the events from the native
I am trying to build a utility method that will generically load entitycollections using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.