Re: IRI creation and encoding

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,
> { ?s <skos:prefLabel> ?label . ?s <myLibrary:hasAlternateURI>
> IRI("http://otherlibrary.example/"+example:percentEncode(?label)+"/lang/"+example:percentEncode(lang(?label))}
> { ?s <skos:prefLabel> ?label . }

SPARQL should support functions described in
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

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