On Tue, Jan 26, 2010 at 14:57, Caleb James DeLisle
<calebdelisle(a)lavabit.com> wrote:
Anca Luca wrote:
On 01/26/2010 01:34 PM, Thomas Mortagne wrote:
> On Mon, Jan 25, 2010 at 21:55, Anca Luca<ancapaula.luca(a)xwiki.com> wrote:
>> Hi all,
>>
>> I would like to go ahead with committing
>>
http://jira.xwiki.org/jira/browse/XWIKI-4775 before the 2.2 final release
>> (because I would like annotations to work as clean as possible on 2.2 final).
>>
>> In order to do that, we need to agree on a set of separators for the object name
>> and property name.
>> There have been the following proposals so far:
>>
>> A wiki:Space.Page^objectName#property
-0.5 (# == URL special character)
I don't think URL special characters are really an issue, you usually
don't use this kind of document reference directly in an URL.
But anyway it's really a pain for velocity which is worst.
B wiki:Space.Page^objectName$property
which has received some votes in
http://markmail.org/thread/uihq4mmwgaufbcz6 but
I personally would stay away from # and $ separators since they're reserved
characters in velocity scripting language and it might be uncomfortable for
using refs in scripts.
+1, i would prefer we stay away of velocity keywords
Also, we had:
C wiki:Space.Page^objectName;property
+0.5, ; look weird to me (no better
argument)
and also:
D wiki:Space.Page:objectName.property
-1, too hard to read for user and know what
is wiki name, object etc.
another proposal:
E wiki:Space.Page^objectName^property
I wonder if users would be puzzled by 2 identical separator, but otherwise I'm
fine with it.
Which one
would you prefer? Any other proposals?
And you ? ;)
I don't know, for example we could use an arrow or a dot? (I like the dot for
prop separator because it's very natural).
F wiki:Space.Page^objectName>property
-0.5 (> == HTML special character)
G wiki:Space.Page^objectName.property
+1
'.' is (will be) escaped in document names so will also be escaped in object
names.
^ will also need to be escaped in object names.
Any
separator should be easy to implement, and roughly anything could be used as
a separator (so feel free to propose).
Note that there is an alternative to this, to make annotations implementable on
2.2: only add the two entity types (Object and Object Property) along with
making the string serializer and string resolver extensible so one could add its
own separators for the 2 new types.
Object and Object Property are standard entity
and should be supported
by default anyway. If you implement it with some separators in
annotation and separator chosen for standard are not the same it will
be a pain to get rid of your custom code in annotation.
Indeed this is a problem. But it could happen anyway, even for document
references which could cause some issues, including in core.
But for annotations, as long as all users of annotations service (that is devs
calling it) use the resolvers & serializers in the annotation-reference module
(as it is called right now), there shouldn't be any problem changing, since that
module can change to use the default separators transparently.
The only issues would be:
* migration of existing annotations, on upgrade
* any calls which build the references "manually" as in actually do a concat
or
something (which shouldn't happen now, since we'd have the document references),
for example from some velocity scripts.
I do prefer implementing it in the core.
Thanks,
Anca
WDYT?
Thanks,
Anca
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs