Jirka,

Upon further inspection, the path to my images in the HTML output file appears 
to have duplicate references to the source path. 

Example using entities:

In the *.ent file:
<!ENTITY createRole_002 SYSTEM "img/createRole_002.png" NDATA PNG> 

In the *.xml file:
    <para><inlinemediaobject>
                        <imageobject>
                                <imagedata entityref="createRole_002"/>
            </imageobject>
          </inlinemediaobject></para>

HTML output:
file:///C:/views/rtvn-12.1/apps/OMS/doc/ModuleUsersGuide/DocTest/file:/C:/views/rtvn-12.1/apps/OMS/doc/ModuleUsersGuide/DocTest/img/createRole_002.png

I am guessing this is my issue, I have no idea why it is happening. Thoughts?




-----Original Message-----
From: Fletcher, Brett 
Sent: Thursday, May 22, 2014 10:18 AM
To: 'Jirka Kosek'; [email protected]
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:[email protected]]
Sent: Thursday, May 22, 2014 10:17 AM
To: Fletcher, Brett; [email protected]
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:[email protected]]
> Sent: Thursday, May 22, 2014 10:01 AM
> To: Fletcher, Brett
> Cc: Frank Steimke; [email protected]
> 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: [email protected]      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: [email protected]      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
------------------------------------------------------------------

Reply via email to