The below example shows a problem with displayed output, both in conductor
and the sparql endpoint.

When a string contains multiple spaces in its data (the inserted object)
then those spaces are collapsed to one in the output.  If this output is
subsequently used in some way then the used value will not match the actual
value and lead to some confusion.  The commented filter is a cut and paste
from the displayed output.

I suppose the solution is to use html entities in the output?

I encountered the issue when dealing with user data that had inadvertently
double-spaced a name field.  When attempting to match the displayed value
in a construct, it failed to bind.  The problem is therefore not merely
cosmetic as copying and pasting output values into conditions is a fairly
frequent activity for a sparql developer and data entry errors are
something we have to live with.

===================
sparql
with <spaceTest>
insert {
<test> <testPred> "Two spaces -->  <--"^^xsd:string .
};

sparql
with <spaceTest>
select *
{
?S ?P ?O .
#filter ( ?O = "Two spaces --> <--"^^xsd:string )
};
===================

-- 
Quentin | Clear Blue Water Pty Ltd
quent...@clearbluewater.com.au
------------------------------------------------------------------------------
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to