Josias Thoeny schrieb:
> Hi Andreas,
> 
>> Hi Lenya devs,
>>
>> the new link URI syntax allows to omit the target language
>> of a link. The actual target translation depends on the existence
>> of a particular language version and on the fallback mode of
>> the link resolver.
>>
>> The other aspect of the issue is that, with a big number of
>> documents, we need an efficient lookup mechanism which documents
>> are referenced by a specific document, and which documents
>> reference a specific document.
>>
>> Because link resolving includes a dynamic factor, we can't store
>> the references on a document-to-document basis, which would be
>> necessary if we store them in document meta (dc:references,
>> dc:isReferencedBy).
>>
>> I see the following solutions:
>>
>> 1. Links must include a specific language version (no dynamics).
>>    But this wouldn't be a real solution, since fallback to the
>>    default language could still be active, so the dynamic factor
>>    would still be there.
> 
> What do you mean exactly with 'fallback to the default language'?

The link resolving could be implemented/configured that the default
language is chosen if the target document doesn't exist in the
explicitely requested language.

> Does the reference management component have to know about this?

The problem occurs e.g. in the following scenario (en is the
default language):

- 123[de] contains a link to 456[de]
- 456[de] doesn't exist
- 456[en] shall be deleted

This would cause a dead link in 123[de] if fallback to the default
language is enabled, otherwise the link is already dead. Should
the delete screen show a warning?


>> 2. References are stored in a global table.
>>    This would certainly work, but it would require a lookup and
>>    wouldn't scale well accross multiple instances (a centralized
>>    link management service would be required).
>>
>> 3. We introduce language-independent meta data and store all
>>    references there. We couldn't use the references/isReferencedBy
>>    meta data, since we need source-target pairs, but this is not
>>    really a problem thanks to the new configurable meta data.
>>
>>    So, the values of the "links" meta data could look like this:
>>
>>      de lenya-document:<uuid>,lang=...
>>      en lenya-document:<uuid>
>>
>>    Or we could add an arrow to clarify the syntax:
>>
>>      de -> lenya-document:<uuid>,lang=...
>>      en -> lenya-document:<uuid>
>>
>>    IMO this looks like the most convenient and efficient approach.
>>    Language-independent meta data would be convenient anyway.
>>
>>
>> WDYT?
> 
> The third option probably makes the most sense for scalability and
> flexibility reasons. And as you say, language-independent meta-data would
> be useful anyway. However it's not the easiest to implement...
> 
> About the editor integration, it would require to scan the document for
> links after saving, and to update the reference meta-data.

Yes, I guess this is the only universal approach.

> In the editor, the links probably have to be displayed as links with a
> normal path like 'foo/bar_de.html'. This means that before the document is
> displayed in the editor, it has to be transformed and the links have to be
> resolved. After saving, the links have to be transformed back to the uuid
> form (and that's where the reference data could be updated).
> Another question is how to set a link without language in the editor gui.
> Maybe there could be a checkbox to select 'link to default language' or
> something like that.

Good points ...
Thanks for your comments!

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to