On Thu, 2006-01-12 at 11:11 -0500, Bob Harner wrote: > The behavior seems to be correct for links to documents, but in my > case the link is actually to an asset (a JPEG file). So even though > the file really exists, it is't actually a "document". I believe > LinkRewritingTransformer should either ignore (leave in place) such > absolute links to assets or correctly check for their existence. What > do you think?
The easiest way probably is to extend the DefaultDocumentBuilder s.t. it recognizes only urls with .html as document urls. This way the LinkRewritingTransformer should leave all other urls (e.g. with .jpg extension) in place. However, if you plan to use the proxy mechanism and you want the asset urls to be rewritten using a proxy url prefix, you have to do it the other way (recognize the assets as documents). I'm not sure if this can be done easily, though. Josias > > I'm at Lenya 1.2.4, by the way. > > On 1/12/06, Andreas Hartmann <[EMAIL PROTECTED]> wrote: > > Bob Harner schrieb: > > > Do you agree that removing such "/mypub/area/docid.html" links is a > > > bug? Or is there good reason for them to be removed? > > > > If the document exists in the same area and the link is removed, > > then this is clearly a bug. > > > > If the URL is a valid document URL and the document does not exist, > > then it is the correct behaviour of the LinkRewritingTransformer. > > > > If the URL is not a valid document URL, then IMO the link should not > > be removed. > > > > -- Andreas > > > > > > > > On 1/12/06, Andreas Hartmann <[EMAIL PROTECTED]> wrote: > > >> Josias Thoeny schrieb: > > >> > > >>> Maybe you could try to use a relative link instead, or patch the > > >>> DocumentBuilder. > > >> Just a note - instead of changing the DefaultDocumentBuilder, you > > >> can subclass it and declare your own class in publication.xconf. > > >> > > >> -- Andreas > > >> > > >> > > >> --------------------------------------------------------------------- > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > >> > > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
