[ 
https://issues.apache.org/jira/browse/JENA-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160187#comment-13160187
 ] 

Henry Story edited comment on JENA-170 at 11/30/11 6:03 PM:
------------------------------------------------------------

It seems to me that xsd:hexBinary would make more sense to store directly as a 
blob, and do value matching on. This is because there is really not much 
personalisation that one can do with a hexBinary. The numbers have to follow 
each other without white space. There can only be white space at the beginning 
and end (if at all). I can see that this would be more of an issue with 
xsd:base64Binary since that literal can contain newlines in the middle of the 
number, and there people may want to keep formatting.

Anyway, is it difficult to add what I now understand is called a D-entailment 
regime for xsd:hexBinary to Jena? Is this something I can do as a developer?
http://www.w3.org/TR/sparql11-entailment/#DEntRegime

I am interested in this  not just for my own implementations, but also because 
we need to specify this behavior carefully in the WebID spec 
http://webid.info/spec#verifying-the-webid-claim . We are using SPARQL there to 
make it as easy to understand for developers and readers of the Spec as 
possible - a spec that we hope will bring a lot of people into the semantic web 
community.
                
      was (Author: bblfish):
    It seems to me that xsd:hexBinary would make more sense to store directly 
as a blob, and do value matching on. This is because there is really not much 
personalisation that one can do with a hexBinary. The numbers have to follow 
each other without white space. There can only be white space at the beginning 
and end (if at all) I can see that this would be more of an issue with 
xsd:base64Binary since that literal can contain newlines in the middle of the 
number, and there people may want to keep formatting.

Anyway, is it difficult to add what I now understand is called a D-entailment 
regime for xsd:hexBinary to Jena? Is this something I can do as a developer?
http://www.w3.org/TR/sparql11-entailment/#DEntRegime

I am interested in this  not just for my own implementations, but also because 
we need to write the specify this behavior carefully in the WebID spec 
http://webid.info/spec#verifying-the-webid-claim 
                  
> hexBinary whitespace issue
> --------------------------
>
>                 Key: JENA-170
>                 URL: https://issues.apache.org/jira/browse/JENA-170
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ, Jena, RDF/XML
>         Environment: 2.6.4
>            Reporter: Henry Story
>            Assignee: Andy Seaborne
>            Priority: Minor
>
> As I understand, initial and final white spaces in xsd:hexBinary in xml 
> should be ignored
>    http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#hexBinary
>  
> because of the whitespace facet.
> With Jena 2.6.4 this is not the case, as shown by the test below. 
> I found that in Clerezza when using the graph api, so this is a problem even 
> when one does not use SPARQL.
> Removing the white space solves the proble. 
> xsd:hexBinary is already a very fragile encoding. Making it this fragile is 
> bound to lead to issues in communication.
> The same is true with the N3 encoding.
> -----------------------------------------------------------------
> hjs@bblfish[0]$ cat q1.sparql 
> PREFIX : <http://me.example/p#> 
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
> SELECT ?S WHERE {
>   ?S :related "AAAA"^^xsd:hexBinary .
> }
> hjs@bblfish[0]$ cat c1.rdf 
> <rdf:RDF xmlns="http://me.example/p#";
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
>     <rdf:Description rdf:about="http://me.example/p#me";>
>         <related rdf:datatype="http://www.w3.org/2001/XMLSchema#hexBinary";>
> AAAA
> </related>
>     </rdf:Description>
> </rdf:RDF>
> hjs@bblfish[0]$ arq --query=q1.sparql --data=c1.rdf
> -----
> | S |
> =====
> -----

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to