You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Maha M Al-Yahya <mm...@Cs.Nott.AC.UK> on 2002/06/17 16:17:01 UTC

Image display

Hello,
  I'm new to cocoon and I'm trying to display an image which i have
included in a stylesheet which looks like this:
<img alt="Built with Apache Cocoon" src="images/cocoon-built.gif"/>
The image file is located in cocoonhome/myapps/resources/images/

I have added the following matcher (as found in cocoon-useres archive)
to sitemap.xmap file
<map:match pattern="images/**.gif">
    <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
</map:match>

but with no success! I only see the "alt" message.
Can anyone help?

Cheers,
mma

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Image display

Posted by Maha Al-Yahya <mm...@Cs.Nott.AC.UK>.
Hi Abhisheck,

Thanks for your reply. I have tried what you mentioned but with no
success. If I change the match in the sitemap to:
<map:match pattern="*.gif">
  <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
</map:match>
then If I request :
http://localhost:8080/cocoon/myapps/cocoon-built.gif the file is served 
and I can see it in the browser. But when I put the <img> tag in a
stylesheet nothing is displayed. I wonder why?

Cheers,
mma

On Mon, 17 Jun 2002, Abhishek Goel wrote:

> hi,
> suppose you are typing the url
> http://localhost:8080/images/cocoon-built.gif
> so when you say "**" the value assigned to {1} will be=
> images/cocoon-built.gif
> which according to your case will become
> src="resources/images/{1}.gif"= "resources/images/images/cocoon-built.gif"
> 
> so i think src should be resource/{1}.gif
> i hope this works.
> regards
> Abhishek Goel
> 
> Maha M Al-Yahya wrote:
> 
> > Hello,
> >   I'm new to cocoon and I'm trying to display an image which i have
> > included in a stylesheet which looks like this:
> > <img alt="Built with Apache Cocoon" src="images/cocoon-built.gif"/>
> > The image file is located in cocoonhome/myapps/resources/images/
> >
> > I have added the following matcher (as found in cocoon-useres archive)
> > to sitemap.xmap file
> > <map:match pattern="images/**.gif">
> >     <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
> > </map:match>
> >
> > but with no success! I only see the "alt" message.
> > Can anyone help?
> >
> > Cheers,
> > mma
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Image display

Posted by Abhishek Goel <Ab...@morganstanley.com>.
hi,
suppose you are typing the url
http://localhost:8080/images/cocoon-built.gif
so when you say "**" the value assigned to {1} will be=
images/cocoon-built.gif
which according to your case will become
src="resources/images/{1}.gif"= "resources/images/images/cocoon-built.gif"

so i think src should be resource/{1}.gif
i hope this works.
regards
Abhishek Goel

Maha M Al-Yahya wrote:

> Hello,
>   I'm new to cocoon and I'm trying to display an image which i have
> included in a stylesheet which looks like this:
> <img alt="Built with Apache Cocoon" src="images/cocoon-built.gif"/>
> The image file is located in cocoonhome/myapps/resources/images/
>
> I have added the following matcher (as found in cocoon-useres archive)
> to sitemap.xmap file
> <map:match pattern="images/**.gif">
>     <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
> </map:match>
>
> but with no success! I only see the "alt" message.
> Can anyone help?
>
> Cheers,
> mma
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>