Relative URL for images

Here should go questions about transforming XML with XSLT and FOP.
nmshah
Posts: 16
Joined: Sun Nov 13, 2005 6:43 am

Relative URL for images

Post by nmshah »

In the oxygen 7.0 Eclipse plugin now there is a place to specify the relative URL for images and it works good for images. I noticed that you are changing the src attributes of all the img tags in the generated HTML to include this relative URL path - which makes the images show up when the result loads in the browser.

However this is not the best way to do this because the result html still doesn't resolve path for CSS and js files.

There is an easier and better way to do this - which is to put a <BASE> tag at the top of the result document (after doctype if doctype is generated) and doing that automatically resolves all the images, CSS and any other static resource which use a relative path in the result document

Here's an example of the BASE tag
<BASE href="file://e:\projects\build_portal\webresources/base.url"/>

I've found that Eclipse internal browser (3.1.1 version) manages the BASE tag properly and resolves all the static resources fine while rendering html

can you please fix this?

Regards,
Nilesh
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

Thanks, we added it on our bugzilla and in a future version the base image URL will go in the BASE tag.

Regards,
Sorin
nmshah
Posts: 16
Joined: Sun Nov 13, 2005 6:43 am

Post by nmshah »

Thanks Sorin. Do you have a timeframe for this?
Just so I know when to check for the update.

- Nilesh
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Nilesh,

As far as I know this was already implemented in the current development stream but it will be available only in the Eclipse plugin. So check out the 7.1 maintenance release when that will be available.

Best Regards,
George
nmshah
Posts: 16
Joined: Sun Nov 13, 2005 6:43 am

Post by nmshah »

Hello Oxygen Team,

Just wanted to say thanks for the 7.1 release. I installed it on Eclipse 3.1.2 and it is working fantastic. 2 out of my 3 wishes have been met in this release. I got support for Oracle XSLT processor and relative URL is fixed as requested in this thread. I hope we will have better project based scenario management in a future version

Great Job!!
- Nilesh
nmshah
Posts: 16
Joined: Sun Nov 13, 2005 6:43 am

Post by nmshah »

I noticed a problem. The relative URL that is specified in the scenario is used while the transformation is applied but is not used in the debugger perspective. So the HTML output in the debugger doesn't resolve any images or CSS
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

In a future version the setting of the base URL specified in the scenario will be used also in the debugger perspective. Until then the base URL for relative paths is the URL of the transformation input. Also you can use full paths to refer images and CSS which works always.

Regards,
Sorin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,
nmshah wrote:The relative URL that is specified in the scenario is used while the transformation is applied but is not used in the debugger perspective. So the HTML output in the debugger doesn't resolve any images or CSS
In the debugger perspective the two output views should display the exact output of the transformer engine. It is a basic requirement of a debugger. Otherwise there are cases when the user is not sure what is the cause of an unexpected output. So the solution for you is to insert a BASE tag in the HTML output from the XSLT stylesheet.

Regards,
Sorin
Post Reply