You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ines Robbers <ml...@comprehend.de> on 2003/03/11 22:54:20 UTC

Image doesn't display

Hello!

I have a problem displaying an image in a stylesheet:

I have read the stuff on
http://wiki.cocoondev.org/Wiki.jsp?page=ServingStaticFiles "Serving
Static Files" but I can't get it to work.
It sais in the end there is another why serving images through apache.
How does that work?

For now I tried to generate, transform and serialize the image because
as is explain on wiki: "the Reader method won't work for a static HTML
document" 

What generator do I use to generate images?

Can anybody please help?


This is what I wrote in the sitemap:

<!-- images -->		
<map:match pattern="img">
   <map:generate src="img" type="imagedirectory"/>
   <map:transform src="img.xsl"/>
   <map:serialize type="html"/>
</map:match>
<map:match pattern="img/**">
   <map:read src="img/{1}"/>
</map:match>

Many thanks!

Ines 



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Image doesn't display

Posted by ad...@gmx.de.
> Hello!
Hi

I am not expert and I cannot point out where your problem
exactly is  anyway I use following pipeline (placed somewhere
at the end of subsitemap)

    <map:pipeline>
      <map:match pattern="**/*.css">
        <map:read mime-type="text/css" src="styles/{2}.css"/>
      </map:match>
      <map:match pattern="**/*.gif">
        <map:read mime-type="image/gif" src="images/{2}.gif"/>
      </map:match>
      <map:match pattern="**/*.jpg">
        <map:read mime-type="image/jpeg" src="images/{2}.jpg"/>
      </map:match>
      <map:match pattern="**/*.js">
        <map:read mime-type="text/plain" src="scripts/{2}.js"/>
      </map:match>
    </map:pipeline>

the images in the xsl (actually part of javascript that is inserted by xslt)

have src attributes like this

var RADIO_ON_IMG = new Image();
RADIO_ON_IMG.src = "images/radio_on.gif";

images are located physicaly in the "images" subdirectory of mounted
subsitemap.

cheers, A.

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


AW: Image doesn't display

Posted by Ines Robbers <ml...@comprehend.de>.
Thank you guys for your help!
I got it working now - the folder you were talking about, rich, was
hidden under:

Programme/Apache Group/Tomcat 4.1/webapps/ROOT  :-)

Have a nice day!

Ines




* Ince,
* 
* The apache folder htdocs or wwwROOT is the folder which 
* apache serves its web pages from. Say your address was
* 
*   http://localhost/cocoon/GUITARS/index.html
* 
* 
* Then the folder directory structure would look like this
* 
*   C:\Programme\Apache\apache folder where you pages are 
* served from\GUITARS\images\your files in here.gif
 



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: Image doesn't display

Posted by Richard Cunliffe <ri...@cunliffe.net>.
Ince,

The apache folder htdocs or wwwROOT is the folder which apache serves
its web pages from. Say your address was

  http://localhost/cocoon/GUITARS/index.html


Then the folder directory structure would look like this

  C:\Programme\Apache\apache folder where you pages are served
from\GUITARS\images\your files in here.gif

You don’t have any XML files in the guitars folder here, you have your
XML files under the tomcat cocoon folder, so:

  C:\Programme\Apache Group\Tomcat4.1\webapps\cocoon\GUITARS

You will have no images within this cocoon guitars folder.

Rich.



-----Original Message-----
From: Ines Robbers [mailto:mlist@comprehend.de] 
Sent: 11 March 2003 22:17
To: cocoon-users@xml.apache.org
Subject: AW: Image doesn't display

Many thanks, Richard!

I have all the files under Programme/Apache Group/Tomcat
4.1/webapps/cocoon/MYFOLDER/img

I have searched for something like a htdocs or wwwROOT - but without
success.
Not sure how to search for the folder you were talking about. ?

Do you mean to save ALL my files under that directory or just the
images?

Ines



* -----Ursprüngliche Nachricht-----
* Von: Richard Cunliffe [mailto:richard@cunliffe.net] 
* Gesendet: Dienstag, 11. März 2003 23:05
* An: cocoon-users@xml.apache.org
* Betreff: RE: Image doesn't display
* 
* 
* Ok I have had this trouble today as well.
* 
* Do you have your xml files under the cocoon folder or one of 
* your own. If so put the images into a folder like shown:
* 
* C:\Program Files\Apache Group\Apache2\htdocs\YOUR FOLDER\images
* 
* YOUR FOLDER = if you have your xml files in a folder called 
* 'guitars' under the cocoon folder then your folder would be guitars.
* 
* The htdocs folder is the folder that serves to the web from 
* apache, it might be different for you e.g. wwwROOT
* 
* 
* You then reference your images in the xsl file like so:
* 
* <img src="/YOUR FOLDER/images/backgroundpda.jpg"/>
* 
* Your images will then display when the webpage is loaded
* 
* 
* Hope this helps,
* 
* Richard.
* 
* 
* 
* 
* 
* -----Original Message-----
* From: Ines Robbers [mailto:mlist@comprehend.de] 
* Sent: 11 March 2003 21:54
* To: Cocoon Mailingliste
* Subject: Image doesn't display
* 
* Hello!
* 
* I have a problem displaying an image in a stylesheet:
* 
* I have read the stuff on 
* http://wiki.cocoondev.org/Wiki.jsp?* page=ServingStaticFiles 
* "Serving Static Files" but I can't 
* get it to work. It sais in the end there is another why 
* serving images through apache. How does that work?
* 
* For now I tried to generate, transform and serialize the 
* image because as is explain on wiki: "the Reader method won't 
* work for a static HTML document" 
* 
* What generator do I use to generate images?
* 
* Can anybody please help?
* 
* 
* This is what I wrote in the sitemap:
* 
* <!-- images -->		
* <map:match pattern="img">
*    <map:generate src="img" type="imagedirectory"/>
*    <map:transform src="img.xsl"/>
*    <map:serialize type="html"/>
* </map:match>
* <map:match pattern="img/**">
*    <map:read src="img/{1}"/>
* </map:match>
* 
* Many thanks!
* 
* Ines 
* 
* 
* 
* ---------------------------------------------------------------------
* To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
* For additional commands, e-mail: cocoon-users-help@xml.apache.org
* 
* 
* 
* 
* ---------------------------------------------------------------------
* To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
* For additional commands, e-mail: cocoon-users-help@xml.apache.org
* 
* 



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


AW: Image doesn't display

Posted by Ines Robbers <ml...@comprehend.de>.
Many thanks, Richard!

I have all the files under Programme/Apache Group/Tomcat
4.1/webapps/cocoon/MYFOLDER/img

I have searched for something like a htdocs or wwwROOT - but without
success.
Not sure how to search for the folder you were talking about. ?

Do you mean to save ALL my files under that directory or just the
images?

Ines



* -----Ursprüngliche Nachricht-----
* Von: Richard Cunliffe [mailto:richard@cunliffe.net] 
* Gesendet: Dienstag, 11. März 2003 23:05
* An: cocoon-users@xml.apache.org
* Betreff: RE: Image doesn't display
* 
* 
* Ok I have had this trouble today as well.
* 
* Do you have your xml files under the cocoon folder or one of 
* your own. If so put the images into a folder like shown:
* 
* C:\Program Files\Apache Group\Apache2\htdocs\YOUR FOLDER\images
* 
* YOUR FOLDER = if you have your xml files in a folder called 
* 'guitars' under the cocoon folder then your folder would be guitars.
* 
* The htdocs folder is the folder that serves to the web from 
* apache, it might be different for you e.g. wwwROOT
* 
* 
* You then reference your images in the xsl file like so:
* 
* <img src="/YOUR FOLDER/images/backgroundpda.jpg"/>
* 
* Your images will then display when the webpage is loaded
* 
* 
* Hope this helps,
* 
* Richard.
* 
* 
* 
* 
* 
* -----Original Message-----
* From: Ines Robbers [mailto:mlist@comprehend.de] 
* Sent: 11 March 2003 21:54
* To: Cocoon Mailingliste
* Subject: Image doesn't display
* 
* Hello!
* 
* I have a problem displaying an image in a stylesheet:
* 
* I have read the stuff on 
* http://wiki.cocoondev.org/Wiki.jsp?* page=ServingStaticFiles 
* "Serving Static Files" but I can't 
* get it to work. It sais in the end there is another why 
* serving images through apache. How does that work?
* 
* For now I tried to generate, transform and serialize the 
* image because as is explain on wiki: "the Reader method won't 
* work for a static HTML document" 
* 
* What generator do I use to generate images?
* 
* Can anybody please help?
* 
* 
* This is what I wrote in the sitemap:
* 
* <!-- images -->		
* <map:match pattern="img">
*    <map:generate src="img" type="imagedirectory"/>
*    <map:transform src="img.xsl"/>
*    <map:serialize type="html"/>
* </map:match>
* <map:match pattern="img/**">
*    <map:read src="img/{1}"/>
* </map:match>
* 
* Many thanks!
* 
* Ines 
* 
* 
* 
* ---------------------------------------------------------------------
* To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
* For additional commands, e-mail: cocoon-users-help@xml.apache.org
* 
* 
* 
* 
* ---------------------------------------------------------------------
* To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
* For additional commands, e-mail: cocoon-users-help@xml.apache.org
* 
* 



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: Image doesn't display

Posted by Richard Cunliffe <ri...@cunliffe.net>.
Ok I have had this trouble today as well.

Do you have your xml files under the cocoon folder or one of your own.
If so put the images into a folder like shown:

C:\Program Files\Apache Group\Apache2\htdocs\YOUR FOLDER\images

YOUR FOLDER = if you have your xml files in a folder called 'guitars'
under the cocoon folder then your folder would be guitars.

The htdocs folder is the folder that serves to the web from apache, it
might be different for you e.g. wwwROOT


You then reference your images in the xsl file like so:

<img src="/YOUR FOLDER/images/backgroundpda.jpg"/>

Your images will then display when the webpage is loaded


Hope this helps,

Richard.





-----Original Message-----
From: Ines Robbers [mailto:mlist@comprehend.de] 
Sent: 11 March 2003 21:54
To: Cocoon Mailingliste
Subject: Image doesn't display

Hello!

I have a problem displaying an image in a stylesheet:

I have read the stuff on
http://wiki.cocoondev.org/Wiki.jsp?page=ServingStaticFiles "Serving
Static Files" but I can't get it to work.
It sais in the end there is another why serving images through apache.
How does that work?

For now I tried to generate, transform and serialize the image because
as is explain on wiki: "the Reader method won't work for a static HTML
document" 

What generator do I use to generate images?

Can anybody please help?


This is what I wrote in the sitemap:

<!-- images -->		
<map:match pattern="img">
   <map:generate src="img" type="imagedirectory"/>
   <map:transform src="img.xsl"/>
   <map:serialize type="html"/>
</map:match>
<map:match pattern="img/**">
   <map:read src="img/{1}"/>
</map:match>

Many thanks!

Ines 



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: Image doesn't display

Posted by Geoff Howard <co...@leverageweb.com>.

> -----Original Message-----
> From: Ines Robbers [mailto:mlist@comprehend.de]
> Sent: Tuesday, March 11, 2003 4:54 PM
> To: Cocoon Mailingliste
> Subject: Image doesn't display
>
>
> For now I tried to generate, transform and serialize the image because
> as is explain on wiki: "the Reader method won't work for a static HTML
> document"

I really don't think this statement is true, unless I have gone crazy.  You
absolutely _can_ serve static html pages with a reader.  I don't see what
it has to do with your situation, though.  Can whoever wrote that statement
on the wiki explain?

>
> What generator do I use to generate images?

Well, remember a generator "generates" xml.  So (except for svg format
images,
which are xml) you don't "generate" images.  You can choose to serve them
with
Cocoon with the one concept that cocoon introduces to bypass the normal xml
pipeline: Readers.  The only problem I saw with the reader you set up is
that
you were not declaring the mime-type, which will cause problems. See the
wiki
page you mentioned for correct examples.

Alternatively, you can choose to have the web server handle images - and
the rest of the thread is answering that.  You asked about where your
document
root is: in apache, go to %APACHE_HOME%\conf\http.conf and look for the
document root configuration line.

Geoff Howard


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org