OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: AW: [docbook-apps] how to set relative paths for HTML image directory?


Hi Robert, 

I just solved a similar problem today with XInclude by using the xml:base attribute of the image. In chapter 23 of Bob's book there is a small section "XIncludes and graphics files", which explains a lot about how this affects XInclude processing.

Right now, I am using XML Mind and saxon 

Here is how I solved the problem with my editor: 

I have a module with two graphics, the module is in a subdirectory so the path - like yours - is ../<path>/<filename>. 
1. For the HTML output graphic I want to use, I set the xml:base attribute to the path of the master document where the XIncludes are referenced.
2. For the fileref attribute of this graphic, I set the path just like it was a graphic linked in the master document. 

In the editor it the graphic displays and when I process to HTML the <img> tags have the right path too.  This way I don't have to do any post processing either, which is nice.

Scott



-----Ursprüngliche Nachricht-----
Von: Robert Nagle [mailto:idiotprogrammer@gmail.com] 
Gesendet: Montag, 29. November 2010 17:59
An: Bob Stayton
Cc: docbook-apps@lists.oasis-open.org
Betreff: Re: [docbook-apps] how to set relative paths for HTML image directory?

Yes, I already did that. This is entirely an Oxygen problem -- not a docbook problem. (you might have missed my follow up).
http://lists.oasis-open.org/archives/docbook-apps/201011/msg00163.html
and here. http://www.oxygenxml.com/pipermail/oxygen-user/2010-November/003442.html

I think I will investigate some other option to make my chunking output instead of Oxygen.  Command line, build scripts, Ant  I haven't decided; whatever is easiest in the long run.
(I already use db2epub.py for making ebooks. works admirably; it in fact it generates its own chunked directory of files in addition to the epub file. The main shortcoming of db2epub.py is that it doesn't seem to support the insertion of external code in docbook http://www.sagehill.net/docbookxsl/InsertExtHtml.html#CodeInPage

code like this prompts db2epub.py to fail: ...
</para>
<?dbhtml-include href="mycode.html"?>
<para>
...




On Mon, Nov 29, 2010 at 9:38 AM, Bob Stayton <bobs@sagehill.net> wrote:
> Hi Robert,
> Did you set the stylesheet parameter keep.relative.image.uris to zero?  
> The default value in the html stylseheet is 1, and that value should 
> preserve whatever the fileref value is without messing with it.
>
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
>
>
> ----- Original Message ----- From: "Robert Nagle"
> <idiotprogrammer@gmail.com>
> To: <docbook-apps@lists.oasis-open.org>
> Sent: Sunday, November 28, 2010 12:22 AM
> Subject: [docbook-apps] how to set relative paths for HTML image directory?
>
>
>> Hi, I'm totally stuck on a HTML path problem for images. The relative 
>> image paths are all relative to the source image directory, not to 
>> the output image directory (which is what I want).
>>
>> I'm using xincludes, a customization layer upon the HTML chunks 
>> stylesheet. I'm using saxon 6.5.5
>>
>>
>> My projects looks like this:
>>
>>
>> myproject
>>  index.xml----------source files
>>  index2.xml
>>  web-images/ ------these are my source images
>>   tall.jpg
>>   wide.jpg
>>  chunks/   -------this is where docbook puts my output
>>     index.html
>>     index2.html
>>     web.css
>>     web-images/----this is my copy of web-images folder. I put this 
>> manually here.
>>       tall.jpg
>>       wide.jpg
>>
>> My fileref looks like this:    <imagedata role="html"
>> fileref="web-images/image1.jpg"/>
>>
>> I want my output html files to use this kind of image reference:
>> <img src="web-images/tall.jpg" />
>>
>> Instead I get this:
>>
>> <img src="../web-images/tall.jpg" />
>>
>> I've looked through the parameters:
>>
>> http://docbook.sourceforge.net/release/xsl/current/doc/html/img.src.p
>> ath.html
>>
>> I would have thought setting that parameter to :
>> <xsl:param name="img.src.path">web-images/</xsl:param>
>>
>> would have solved the problem. But instead I see that nothing has 
>> changed in the output.
>>
>> I've read  the Docbook XSL book closely and still haven't figured it 
>> out. I've also tried some parameters: html.base and other shots in 
>> the dark (though I haven't tried entityref -- mainly because I don't 
>> understand it--), but  none seem relevant or have worked.
>>
>> I'm reluctant to change my path structure because I use the same 
>> project to generate an epub file. The db2epub.py script works 
>> perfectly in how it handles images: it transfers all of them to a new 
>> web-images directory.
>>
>> I don't have any special docbook parameters in my customization layer 
>> (at least not anything which would affects paths).
>>
>> Is it possible that there's a bug here? Or am I missing something obvious?
>>
>>
>> --
>> Robert Nagle
>>
>> htpt://www.robertnagle.info
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: 
>> docbook-apps-help@lists.oasis-open.org
>>
>>
>>
>
>



--
Robert Nagle
12777 Ashford Point Dr #1417
Houston, Texas 77082
713 893 3424
http://www.robertnagle.info

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]