On May 6, 2009, at 6:31 PM, Ludovic Dubost wrote:
Thomas Mortagne a écrit :
On Wed, May 6, 2009 at 17:09, Ludovic Dubost
<ludovic(a)xwiki.org>
wrote:
I'm -1 on this.
This is like saying we should put the fully qualified name when
- linking to an anchor in your page
- linking to a page in the same space
This example as nothing to do with what i suggest since this is user
input and not technical generated datas. I'm speaking about internal
generated datas, datas you don't find in the export, the link table
is
not exported etc...
I tend to think that what I say is true for any data.
As Anca points out a mysql backup of the backlinks data with absolute
links would not work if you recover it under another db name.
Note: If you create links to other wikis and these other wikis change
their name in the database you'll have the same problem (i.e. you'll
need to run some script to modify the link names).
-Vincent
>> We should always store information as
"relative". If a document is
>> in
>> the same wiki then you should not specify the wiki.
>> If it is in the same space you should not specify the space.
>>
>> Imaging you want to export/import a wiki that was in a farm in a
>> database names 'wiki1' and you import the pages in a farm where the
>> database is names 'wiki2'. Then your import process will have to run
>> conversions, or you wiki will be fully broken.
>>
>> I'm for generalizing "relative" storage if there are places where
we
>> hard code the wiki name or the space name.
>>
>> Ludovic
>>
>> Thomas Mortagne a écrit :
>>
>>> Hi devs,
>>>
>>> The real full qualified name of a document is wiki:Space.Page. I
>>> think
>>> we sould always use only this form for technical purposes like
>>> storing
>>> in database or old API which does not support DocumentName.
>>>
>>> pros:
>>> - don't need to take care of the context, the information is
>>> always right.
>>> - if everything is stored in only one form it's way easier to
>>> compare
>>> things and do requests
>>>
>>> cons:
>>> - old code which does not support this document name form will
>>> fail.
>>> This could hardly be a good arguments since this form is a
>>> officially
>>> valid document name but i can't see anything else.
>>>
>>> Among others, the last use case which make me send this proposal is
>>>
http://jira.xwiki.org/jira/browse/XWIKI-3754. IMO getLinkedPages
>>> return and the link table should only contains fully qualified
>>> links,
>>> especially since theses lists are supposed to contains uniques
>>> documents and we need to know the 3 parts of the document name to
>>> make
>>> sure of that . Note that a document could contain a link to a
>>> document
>>> in another wiki or even a link to the same document but written
>>> in its
>>> full form so a code which support only local form is wrong anyway.
>>>
>>> WDYT ?
>>>
>>> Here is my +1. The pros are basically the same that make us
>>> introduce
>>> DocumentName to not manipulate String anymore in code.
>>>
>>> --
>>> Thomas Mortagne