Andreas Hartmann schrieb:
(...)
I think we have a design problem with the id / uri business. IIUC we have code in the core which assumes ids (meaning, in the default pub, including the parent paths, such as /index/test123/test5) and the uri (meaning, where can the source be found) are basically the same.


No, that's not assumed. The relation is clearly defined as follows:


Browser URI: /index/test123/test5[...]

    |
    | mapping by DocumentBuilder
    |
    v

  Document object
    Document ID:         /index/test123/test5
    Language:            en

    |
    | mapping by DocumentIdToPathMapper
    |
    v

  Document source URI:   /index/test123/test5_en.xml

How the source URI is assembled is only known by the DocumentIdToPathMapper.

Thx for explaining

Wouldn't that imply that the blog pub should have its own implementation of DocumentIdToPathMapper ?

The alternative is to force the blog entries to have the same close mapping between ids and uri paths as the default publication, so that the DefaultDocumentIdToPathMapper can be used for both publications. This is was I was trying to say in my earlier mail, making ids that match the source path, such as 2005/05/18/testA

But IIUC this is what you actually did, since the entry path creation logic was moved from the blog creator to the blog usecase; this way the id "path" is indeed the same as the URI path.


(...)
I guess we have to decide between
1. permit a document id to be completely different from the way the document's URI is constructed.


With document's URI do you mean the browser URI?
That would be a major change ...

No, I meant our internal URI, meaning where to find the source. I understand now this should be handled by the implementation for DocumentIdToPathMapper



2. decide that knowing a document's id must be sufficient to compute its URI (meaning its internal address, basically lenya://pub-path/document-id)


Hmm, I don't understand ... If you have the document object, you can
resolve its source URI by getSourceURI().

Yes.
Basically my pb started when trying to create a blog entry via URI instead of File, and the nodes were not locked, because getSourceURI() returned something else for the blog entries than their actual path.
IIUC that is no longer the case.



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



Reply via email to