Bob Harner wrote:

[...]

That's fine, I'm not particular about where the link rewriting occurs.
 Doing it at the point when the document is being saved or moved makes
the most sense to me anyway.  But accounting for a variety of possibly
URI forms coming in from the editors seems like the right thing to do
for a robust CMS.  So this leads me to think there should be three
distinct link rewriting events:

1) when a document is saved: rewrite all internal links (to both
documents and assets) be in the Lenya-standard form.

Yes, that would be the responsibility of the editor component or
an import mechanism. But I wouldn't call it link rewriting.


2) when a document is moved:  rewrite all document-relative links to
be relative to the new location

IMO no relative links should be supported, only UUIDs. Link rewriting
when a document is moved requires parsing and locking all involved
documents, which I'd try to avoid if possible.


3) when a document is displayed: verify the existance of each document
link's target and then specially style or erase those links that are
broken.

That should be the only place where link rewriting (or rather resolving)
occurs. Performance issues should be solved by indexing, caching etc.


The first two seem to call for a more general version of
LinkRewritingTransformer that can look at URL's in any of the several
forms and convert them to any one of the other forms,

No, it shouldn't be implemented in a centralized way. The editor
component itself has to take care of it. This provides flexibility
and extensibility without adding code to the core. You can't provide
a core component which has the knowledge about the link syntax of
various editors.


with a parameter
specifying which form to output.  The third might be unneeded when we
have a link management capability.

IMO the second becomes unneeded when we have a link management
capability.

[...]

-- Andreas


--
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[EMAIL PROTECTED]                     [EMAIL PROTECTED]


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

Reply via email to