Tim,

I agree that the uniqueness is only sometimes needed. I also had enough use 
cases where the [...] labels were unnecessarily complex. I think I will add a 
global option to SWP so that ui:label will not generate unique labels. Or more 
general, a setting that allows you to redirect ui:label to any other SPIN 
function - this way all components can consistently use ui:label but server 
installations can decide to use different naming conventions. I will put this 
on my bug tracker list now.

Thanks,
Holger


On Mar 10, 2011, at 8:40 AM, Smith, Tim wrote:

> Thanks Scott!
> 
> I was wondering if that might be the case.  For this use case, I don't care 
> about uniqueness given that I'm just generating SWPs for read-only access.
> 
> Thanks for the options!
> 
> Tim
> 
> 
>> -----Original Message-----
>> From: [email protected] [mailto:topbraid-
>> [email protected]] On Behalf Of Scott Henninger
>> Sent: Wednesday, March 09, 2011 4:29 PM
>> To: TopBraid Suite Users
>> Subject: [topbraid-users] Re: smf:name Question
>> 
>> Hello Tim; smf:name includes a key feature for creating unambiguous
>> labels.  This is key for things like autocomplete in Ensemble and
>> EVN.  In your case, there are two labels that have the string "has
>> direct part", so the qname is shown so you can use the labels to
>> distinguish which URI the label refers to.  This should be explained
>> in the description for smf:name, so we'll fix that.  The label
>> algorithm is described in full in the TBE App Dev and Reference Guide
>> (see the More Information column at
>> http://www.topquadrant.com/products/TB_Ensemble.html).
>> 
>> If you don't want that label algorithm, i.e. you are OK with duplicate
>> labels, then you can write a function that will get the label or the
>> local name, if one doesn't exist.  One example off the top of my head:
>> 
>> SELECT ?name
>> WHERE
>> { OPTIONAL {?arg1 rdfs:label ?label}
>>  LET (?name := smf:if(bound(?label), ?label, afn:localname(?arg1)))
>> }
>> 
>> -- Scott
>> 
>> On Mar 9, 3:00 pm, "Smith, Tim" <[email protected]> wrote:
>>> Hi,
>>> 
>>> When I pass two different resources to smf:name, I get an interesting
>> result.
>>> 
>>> For one resource, smf:name returns the exact contents of rdfs:label
>> as expected.
>>> 
>>> For the other resource, smf:name returns the contents of rdfs:label
>> with the prefix/shortname appended in []s.
>>> 
>>> For example, the resource
>>> 
>>> http://ontologies.semanticarts.com/gist/gist#hasDirectPart
>>> 
>>> has a label of "has direct part" and a short name of
>> "gist:hasDirectPart"
>>> 
>>> However, smf:name(gist:hasDirectPart) returns the string:
>>> 
>>> has direct part [gist:hasDirectPart]
>>> 
>>> Only some resources are returned with the short name appended.  I
>> cannot see any difference in the resources.  This happens to properties
>> and instances.  I have not tested classes.
>>> 
>>> Any idea why this is happening?  It tends to make SWPs look a bit odd
>> with the short names appearing.
>>> 
>>> Thanks for your help,
>>> 
>>> Tim
>> 
>> --
>> 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

-- 
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