Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 18302 invoked by uid 500); 2 Jan 2003 13:20:38 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 18291 invoked from network); 2 Jan 2003 13:20:37 -0000 Content-Type: text/plain; charset="koi8-r" From: Joerg Pietschmann To: cocoon-users@xml.apache.org, "Anna Afonchenko" Subject: Re: Loading images with relative src Date: Thu, 2 Jan 2003 14:16:46 +0100 X-Mailer: KMail [version 1.3.1] References: <005d01c2b245$7c5f40a0$a800000a@lisa> In-Reply-To: <005d01c2b245$7c5f40a0$a800000a@lisa> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200301021420481.SM00297@there> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Thursday 02 January 2003 10:58, Anna Afonchenko wrote: > Hi all. > I noticed that if I have pipeline like this: > > > > > > Some of the images on the page are not loaded, because they have a relative > rather than absolue src, e.g. something like src="images/pic.gif" instead > of src="http://xml.apache.org/images/pic.gif' This is really a HTML question, and how browsers resolve URLs. The images as well as CSS are loaded by the browser and wont go through the pipeline above. Suppose the URL "http://myserver.org/base/load" triggers the pipeline above. Then if the browser hits an it will do a GET request for the URL "http://myserver.org/base/images/pic.gif" and so on. > Now my question is: > If I want to present the page with all the information present, like images > and applied external stylesheets through Cocoon. Is there some automated > way of doing this, or do I have to do this manually, e.g. make an xsl that > will replace each src and href attribute that doesn't start with http: to > be absolute by inserting the start of the path into each one? You can define pipelines redirecting the image and CSS URLs to their original locations, perhaps if you insert at the end of the match chain