- From: Ivan Mikhailov <imikhailov@openlinksw.com>
- Date: Fri, 04 Jun 2010 13:08:12 +0700
- To: Peter Ansell <ansell.peter@gmail.com>
- Cc: public-rdf-dawg-comments@w3.org
Hello Peter,
> it would be nice if the discussion could
> also include something about a function for string transformation to
> encode strings so that the URIs are valid.
>
> For example it would be nice to be able to do something similar to the
> following pattern using a IRI/URI creation facility,
>
> CONSTRUCT
> { ?s <skos:prefLabel> ?label . ?s <myLibrary:hasAlternateURI>
> IRI("http://otherlibrary.example/"+example:percentEncode(?label)+"/lang/"+example:percentEncode(lang(?label))}
> WHERE
> { ?s <skos:prefLabel> ?label . }
>
SPARQL should support functions described in
http://www.w3.org/TR/xpath-functions/#func-encode-for-uri
and below, as part of XQuery core functions library, so I'm not sure
that new function names are needed. However we should extend domain of
the existing XQuery core function in order to cove new data types.
Best Regards,
Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com
P.S. This is my personal opinion, not a reply from a W3C group.
P.P.S. Virtuoso syntax would be
CONSTRUCT { ?s <skos:prefLabel> ?label ; <myLibrary:hasAlternateURI>
`IRI(bif:sprintf ("http://otherlibrary.example/%U/lang/%U", ?label, lang(?label))` }
WHERE { ?s <skos:prefLabel> ?label . }
Received on Friday, 4 June 2010 06:09:12 UTC