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: RE: [docbook-apps] Problem with images given as entity in xhtml output (template process.image)


You made my day

-----Original Message-----
From: Jirka Kosek [mailto:jirka@kosek.cz] 
Sent: Thursday, May 22, 2014 10:17 AM
To: Fletcher, Brett; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Problem with images given as entity in xhtml output (template process.image)

On 22.5.2014 17:12, Fletcher, Brett wrote:
> First, Thank you for replying! I will gladly take your advice of eliminating Entities. 

Please, next time reply to all, so answer is sent back to the whole mailing list.

> As far as the solution you provided, could you provide an example of how it would look in an xml doc? Also, I am guessing I need to modify an .xsl file? I have never done that before and am not sure how to do that. I inherited my setup and am having to learn XML on the fly while trying not to fall to far behind in the actual work! Do you have any suggested reading?

You should definitively read the following book if you mean it seriously with using DocBook XSL stylesheets:

http://sagehill.net/docbookxsl/index.html

Back to your question. In your document you will use just filenames without any path:

<imagedata fileref="picture.png"/>

Then in subdirectories like "version1" and "version2" you will store two different versions of this image, both times in a file called picture.png

Then during the processing you will set "img.src.path" parameter either to "version1/" or "version2/" value. You can set parameter from command line when invoking XSLT processor or you can store it into your own XSL customization layer. More details are in the book mentioned above.

				Jirka

> Thanks again!
> 
> Brett
> 
> -----Original Message-----
> From: Jirka Kosek [mailto:jirka@kosek.cz]
> Sent: Thursday, May 22, 2014 10:01 AM
> To: Fletcher, Brett
> Cc: Frank Steimke; docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] Problem with images given as entity in 
> xhtml output (template process.image)
> 
> On 22.5.2014 16:42, Fletcher, Brett wrote:
>> I am (I think) trying to accomplish the same thing as Frank. I have 
>> multiple docs which use the same copy, but require different figures.
>> I was hoping to define those figures in entity files so they would be 
>> easier to maintain. The references do not appear to be making it into 
>> the docs. This all sounds like what I am trying to do, but not being 
>> very familiar, I was hoping someone might offer a high-level 
>> explanation of how this is all working? Then perhaps I can understand 
>> the presented solutions.
> 
> First advice -- try to eliminate usage of entities in your documents. In XML entities will give you more troubles then advantages (situation was different in SGML where entities were more flexible).
> 
> In your case, you can put each set of images into different directory, but using same filenames. Then use following parameter to switch directory from which images will be loaded:
> 
> http://docbook.sourceforge.net/release/xsl/current/doc/html/img.src.pa
> th.html
> 
> 					Jirka
> 
> 
> --
> ------------------------------------------------------------------
>   Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
> ------------------------------------------------------------------
>        Professional XML consulting and training services
>   DocBook customization, custom XSLT/XSL-FO document processing
> ------------------------------------------------------------------
>  OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
> ------------------------------------------------------------------
>     Bringing you XML Prague conference    http://xmlprague.cz
> ------------------------------------------------------------------
> 

--
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------



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