On 29.04.2004 18:16, [EMAIL PROTECTED] wrote:

We are trying to display image on the IE. The problem is that we are
forced to specify the absolute path of the image, whereas the
requirement is to specify the relative path. On the browser the the foll
URL is typed for displaying the html page.
http://localhost:8080/cocoon/mointest/helloworld.html .

Though your text is clear I do not really understand. Are you saying that you see the picture in the browser when specifying D:\jboss-3.2.3\... as URL of the image? That's impossible - or it's grabbed locally, but not from the server.


From your code it should be easily
<picture file="images/eagle.jpg"/>

Of course you need an appropriate matcher in your sitemap, something like

<map:match pattern="images/*.jpg">
  <map:read src="{0}" mime-type="image/jpg"/>
</map:match>

Joerg

The following is the code snippet for the XML file

<?xml version="1.0"?>
<page>
  <title>Hello</title>
  <content>
    <paragraph>Hello World<paragraph>
  </content>
  <picture 
file="D:\jboss-3.2.3\server\default\deploy\cocoon.war\mointest\images\eagle.jpg"/>
</page>

The following is the code in the XSL file

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="picture">
  <img>
    <xsl:attribute name="src">
      <xsl:value-of select="@file"/>
    </xsl:attribute>
  </img>
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="content">
  <xsl:apply-templates/>
  <h1><xsl:apply-templates select="*"/></h1>
</xsl:template>

<xsl:template match="paragraph">
  <table border='1'>
    <tr>
      <td align='center'>
        <xsl:apply-templates/>
      </td>
    </tr>
  </table>
</xsl:template>
</xsl:stylesheet>

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



Reply via email to