Hugh

This isn't a bug AFAICT, a naked # is not allowed in a SPARQL prefixed name, 
even in 1.1 it needs escaping with a \
See the PL_LOCAL_ESCAPE rule - 
http://www.w3.org/TR/sparql11-query/#rPN_LOCAL_ESC

So the Virtuoso parser looks to be correct in treating the # onwards as a 
comment which is exactly what it is

The update given can be rewritten to be legal SPARQL syntax like so:

prefix semannpub: <http://example.com/publication/>
prefix semannpdf: <http://example.com/pdf/>

INSERT DATA
{
GRAPH <test>
{
semannpdf:test3.pdf semannpub:hasExcerpt 
semannpdf:test3.pdf\#page\=2\&char\=10\,20\;length\=10\,UTF-8 .
}
}

Note that all the special characters - # & = ; , - need escaping for it to be a 
valid SPARQL prefixed name

Rob

From: Hugh Williams <hwilli...@openlinksw.com<mailto:hwilli...@openlinksw.com>>
Date: Monday, 10 March 2014 01:28
To: Jaana Takis <jaana...@hotmail.com<mailto:jaana...@hotmail.com>>
Cc: 
"virtuoso-users@lists.sourceforge.net<mailto:virtuoso-users@lists.sourceforge.net>"
 
<virtuoso-users@lists.sourceforge.net<mailto:virtuoso-users@lists.sourceforge.net>>
Subject: Re: [Virtuoso-users] sparql INSERT with URI fragments not working

Hi Jaana,

I have been able to recreate this issue and reported to development to look 
into ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

On 8 Mar 2014, at 11:22, Jaana Takis 
<jaana...@hotmail.com<mailto:jaana...@hotmail.com>> wrote:

Hi!
I am puzzled why the below does not work with Virtuoso sparql query editor (it 
enters the object disregarding everything as of the hash, ie 
<http://example.com/pdf/test3.pdf<http://eis.iai.uni-bonn.de/semann/pdf/test3.pdf>>)
 :

prefix semannpub: <http://example.com/publication/>
prefix semannpdf: <http://example.com/pdf/>

INSERT DATA
{
GRAPH <test>
{
semannpdf:test3.pdf semannpub:hasExcerpt 
semannpdf:test3.pdf#page=2&char=10,20;length=10,UTF-8 .
}
}

If I use a full URI without the fragment identifier it does work... but what am 
I doing wrong that I cannot seem to get it to work in combination with 
namespaces?

prefix semannpub: <http://example.com/publication/>
prefix semannpdf: <http://example.com/pdf/>

INSERT DATA
{
GRAPH <test>
{
semannpdf:test3.pdf semannpub:hasExcerpt 
<http://example.com/pdf/test3.pdf#page=2&char=10,20;length=10,UTF-8> .
}
}

Thanks!
Jaana
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net<mailto:Virtuoso-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to