cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <anand.vasude...@wipro.com>
Subject Problems displaying image on the browser
Date Thu, 29 Apr 2004 16:16:40 GMT

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 .

The following is the code snippet for the XML file

<?xml version="1.0"?>
<page>

	<title>Hello</title>

	<title>Hello</title>
	
		<content>
		
			<paragraph>Hello Worldparagraph>
				
		</content>

	<picture
file="D:\jboss-3.2.3\server\default\deploy\cocoon.war\mointest\images\ea
gle.jpg"></picture>

</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>




Confidentiality Notice

The information contained in this electronic message and any attachments to this message are
intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information.
If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com
immediately
and destroy all copies of this message and any attachments.

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


Mime
View raw message