Pim,

 

I think you are missing angle brackets. See the following in the Help
->Reference -> SPARQL Function Reference:

 

smf:buildURI (spin:Function)

Constructs a new URI resource by inserting the existing variable bindings
into a template. The template can mention variable names in curly braces,
such as "my:Instance-{?index}" would create "my:Instance-42" is ?index has
the value 42. As an alternative to variable names, the function can take
additional arguments after the template, the variables of which can be
accessed using {?1}, {?2} etc. For example:
smf:buildURI("my:Instance-{?1}-{?2}", ?day, ?month) would insert day and
month at places {?1} and {?2}.

Arguments


sp:arg1 (xsd:string <http://www.w3.org/2001/XMLSchema#string> ): The URI
template such as "<http://my.com/Instance-{?index}>". If the template
contains a full URI, then it must be wrapped by <...>, otherwise the system
will treat it as a qname.

Return type

*       Resource
<http://127.0.0.1:1385/help/topic/org.topbraidcomposer.help/html/uispin?_res
ource=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource>  

 

Regards,

 

Irene

From: [email protected]
[mailto:[email protected]] On Behalf Of Helm, P.W. (Pim) van
den
Sent: Wednesday, December 01, 2010 4:41 AM
To: [email protected]
Subject: [topbraid-users] smf:buildURI results in invalid URI's

 

Hi all,

 

I am translating an semantic-xml document to an ontology. 

 

Doing this I want the ID's used in the xml document (of format GUID) to
convert into an fragment identifier following the baseURI of my new
ontology. The GUIDs can start with a number but our usage of the fragments
doesn't allow this further allong the proces. So I want to add "_" infront
of my ID to overcome this issue. 

 

 The method I use for creating the URI using the fragment is:

   LET (?object := smf:buildURI
("http://www.bimtoolset.org/ontologies/BB_coins.owl#_{?id}";)).

   or 

   LET (?object := smf:buildURI (" <http://#_{?id> :_{?id}")).

 

 Both result in the [?object] result showing only the "_" followed by the ID
without the baseURI and "#" infront. This seems not correct.

 

Doing a similar creation without the "_" so:

   LET (?object := smf:buildURI ("
<http://www.bimtoolset.org/ontologies/BB_coins.owl#{?id>
http://www.bimtoolset.org/ontologies/BB_coins.owl#{?id}";)).

   or 

   LET (?object := smf:buildURI (": <http://#_{?id> {?id}")).

 

has results with and without the baseURI infront. The ID's starting with a
number contain the baseURI infront (expected output), and the ID's NOT
starting with a number again don't contain the baseURI. 

 

Is this expected behavior or am I doing something wrong?

 

with kind regards,
Pim

This e-mail and its contents are subject to the DISCLAIMER at
http://www.tno.nl/disclaimer/email.html

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to