473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Background image in XML ..Urgent !!

I have a XSL file which has the following code for background image.
<fo:table-body>
<fo:table-row text-align="center">
<fo:table-cell background-image="copy.gif"
border-after-style="none" border-before-style="none"
border-end-style="none" border-start-style="none" font-size="10pt"
text-align="center" padding-start="3pt" padding-end="3pt"
padding-before="3pt" padding-after="3pt" display-align="center"
border-style="solid" border-width="1pt" border-color="white">

I am running this in weblogic and during runtime the FOP parser always
looks for copy.gif in the weblogic directory which is
c:\bea\user_projects\mydomain. But I have the gif file in my web
application directory c:\xxx\yyy\ where the *.XSD file resides. What
should I set the URL to to tell the FOP parser to get the gif file
from same directory as where the XSD resides ??

Thanks
Jul 20 '05 #1
1 7444
de*******@yahoo.com (Manoj Nair) wrote in message news:<92**************************@posting.google. com>...
What should I set the URL to to tell the FOP parser to get the gif
file from same directory as where the XSD resides ??


1. Write an action to pass the path to the sitemap.
[see http://www.db.informatik.uni-kassel..../actions.html]

Context context = ObjectModelHelper.getContext(objectModel);
String path = context.getRealPath(request.getServletPath());
java.io.File f = new java.io.File(path);
if (!f.isDirectory())
path = f.getParentFile().getAbsolutePath();
sitemapParams.put("path", path);

2. In the transform element of your sitemap add a parameter to pass
the path to the xsl.
<map:parameter name="path" value="{path}" />

3. In your xsl, add a parameter to use the path in your xsl.
<xsl:param name="path" select="''"/>

background-image="url('{$path}/copy.gif')"

Hope this helps,
Patrick
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Markus Mohr | last post by:
Hi, everyone, I have a special problem: For every monitor resolution in 200 pixel steps from 800 to 1600 pixels I have an image to be shown as centered background-image. Those images all...
4
by: Dj Frenzy | last post by:
Hi, I know how to use javascript to change a background image to another background image, and how to change a background colour to another background colour. Is there a way to change an image to a...
2
by: day | last post by:
I'm trying to use a non-scrolling background image within a div (the non-scrolling part is a "nice-to-have" vs a "have to have"). The style for that is: <div style="height=400px;...
7
by: Nilesh | last post by:
I am using background-image attribute in a CSS file and linking the CSS file to aspx page. But strangly, background-image attribute is not working for relative URL. e.g. If I apply following css...
3
by: Sridhar | last post by:
Hi, I have created a user control which has the html code as follows <TABLE id="ToolBarTable" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td align="right"...
3
by: KNDesign | last post by:
I've set a background image to repeat-y and at 100% height. It appears fine when I open the window, but when I resize to a smaller height so that I must scroll down to see the rest, the background...
16
by: stevedude | last post by:
CSS newbie again. I have a problem trying to get coffee mug images within anchor tags to center with my link text for a vertical list menu. If I use the horizontal/vertical properties of...
4
by: Bob Altman | last post by:
Hi all, I posted an earlier question to the microsoft.public.inetserver.asp.general newsgroup asking how to set the background of a client-side table cell to a gradient, and I received this...
2
by: thephatp | last post by:
I'm having a problem with IE rendering correctly. I'm experimenting with using all div's in my pages now, and I'm not very familiar with the quirks of IE. I have created a sample page, and I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.