[EMAIL PROTECTED] wrote:
On 5/31/07, Andreas Hartmann <[EMAIL PROTECTED]> wrote:
Richard Frovarp schrieb:
> Is there a way to call a page via it's UUID from a browser? My issue is
> that we translate from UUIDs to URLs when a page is being edited.

That's a very good point.

> If an
> object being targeted (image or link) changes path while the page is
> being edited, it then becomes lost. Links really don't matter if they
> are left as lenya-document as they aren't rendered. However, images need
> to be rendered. If there is some way of accessing a document via HTTP
> using it's UUID, a pre-processing instruction can be put in to handle
> creating those URLs, and things will be good.

We should certainly introduce such a URL space. It will also be helpful
for debugging. Should we use a particular prefix, or does the UUID space
itself provide enough safety from name clashes?
  /{pubId}/{area}/{uuid}.png

In theory, this would be sufficient:
- It is very unlikely to have a URL with this syntax which is
  not a UUID.
- If the "natural" URL space uses UUIDs, there is no risk for clashes
  because UUIDs are unique.

The problem is that we'd need to check if a document with this
UUID exists for each call which matches
  /{pubId}/{area}/????????-????-????-????-????????????
to avoid masking the "natural" URL space of the publication.
Considering this, it might make sense to use a particular prefix, e.g.:
  /{pubId}/{area}/lenya-uuid/{uuid}.png

WDYT?
-- Andreas


This feature was implemented in 1.3.  The design used one protocol
(cleverly named "content:") for access to all documents and resources.
The protocol finds the resource by testing a variety of formats
including the UUID. (UUIDs are strictly formatted UNIDs.)  See the
second half of 13HELP for the specs:
http://svn.apache.org/repos/asf/lenya/branches/revolution/1.3.x/13HELP.txt

XMAPs can just pass the resource identifier portion of the URL to the
protocol and retrieve the correct resource.  That avoids issues about
needing a special prefix.  The protocol works fine internally so no
other code cares whether the identifier is a path or UNID.

Links should always be stored as UNIDs.  Editors must translate
path-based identifiers to UNIDs before storing documents.  The "Add
link" and "Add image" functions should display resource titles to hide
UNIDs from users.

solprovider

There is a protocol in 1.4, lenya-document. I want to use HTTP(S) and provide the UUID. Upon save, the path-based identifiers are converted to UUIDs for storage. Links really don't matter too much as they are links and render properly if their URL is of the lenya-document protocol. Images however, currently have to be translated from UUID to path-based when the page is loaded into the editor, so that they display. When saved out they are converted back to UUID. The problem here is if the image is moved (or anything referenced by a path inside of Lenya) while a page referencing it is being edited, the reference could be lost. This is what I hope to prevent from happening.

How do you handle displaying images in the editors?

Richard

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

Reply via email to