This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: Problem with images when generating HTML output ...
- From: Giuseppe Greco <giuseppe dot greco at bluewin dot ch>
- To: Jeff Beal <jeff dot beal at ansys dot com>
- Cc: DocBook Apps <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 30 Dec 2002 16:50:53 +0100
- Subject: RE: DOCBOOK-APPS: Problem with images when generating HTML output ...
- Organization: Agamura Corp.
- References: <E08C8F26F6901D42B1201763D125853815B3EE@ntdevexc.win.ansys.com>
Jeff,
Thanks for your support.
I will try it!
Have a nice day.
Gius_.
On Mon, 2002-12-30 at 15:53, Jeff Beal wrote:
> I haven't worked with PassiveTex and have used Tex only a little, and that
> didn't include graphics, so I'm a bit in the dark on this behavior. I know
> that neither FOP nor XEP infer graphic extensions if one doesn't exist.
>
> As for the general concept of having the stylesheets add an extension based
> on the format, it seems that specifying multiple alternate mediaobjects and
> selecting the right one for the output is a better approach.
>
> <mediaobject>
> <imageobject>
> <imagedata fileref="myImageFile.eps" format="EPS"/>
> </imageobject>
> <imageobject>
> <imagedata fileref="myImageFile.pdf" format="PDF"/>
> </imageobject>
> <imageobject>
> <imagedata fileref="myImageFile.png" format="PNG"/>
> </imageobject>
> <textobject>
> <phrase>My text</phrase>
> </textobject>
> </mediaobject>
>
> In order for this to work exactly as you want it, you'll probably have to
> customize the is.graphic.format and is.graphic.extension templates from the
> graphics.xsl files in the DocBook Stylesheets.
>
> Bob Stayton has been modifying the selection mechanism for mediaobjects
> somewhat, though. These changes may make some of this work easier.
> Depending on your timeframe, you may want to hold off until the next
> stylesheet distribution. (See
> http://lists.oasis-open.org/archives/docbook-apps/200212/msg00080.html for
> some details on the new mechanism.)
>
> Jeff Beal
>
> -----Original Message-----
> From: Giuseppe Greco [mailto:giuseppe.greco@bluewin.ch]
> Sent: Monday, December 30, 2002 9:37 AM
> To: Jeff Beal
> Cc: DocBook Apps
> Subject: RE: DOCBOOK-APPS: Problem with images when generating HTML
> output ...
>
>
> Jeff,
>
> I use xsltproc to produce FO output and then PassiveTeX
> to produce PDF/PS output.
>
> Of course, the FO file doesn't contain the file extension;
> it is automatically added by PassiveTeX.
>
> In the example I sent you this morning, PuassiveTeX would
> append the ".ps" extension when generating PS output
> and the ".pdf" extension when generating PDF output.
>
> I think it would be nice if the stylesheet would automatically
> append the file extension in accordance to the "format" attribute.
>
> What do you think about?
>
> On Mon, 2002-12-30 at 15:04, Jeff Beal wrote:
> > The stylesheets don't add extensions to match the format. They assume the
> > filename is correct and use the format as part of the mediaobject
> selection
> > mechanism. In order to do what you want, you'd have to copy and customize
> > the template named "process.image" in graphics.xsl.
> >
> > I am a little confused as to why you want to have the stylesheets generate
> > an extension and how your FO processor is working fine without the
> > extension. The fileref attribute should be a valid URI to a file,
> including
> > the extension. Could you provide a bit more information on the problem
> you
> > were having that caused you to drop the .png extension?
> >
> > Jeff Beal
> >
> > -----Original Message-----
> > From: Giuseppe Greco [mailto:giuseppe.greco@bluewin.ch]
> > Sent: Monday, December 30, 2002 5:15 AM
> > To: DocBook Apps
> > Subject: DOCBOOK-APPS: Problem with images when generating HTML
> > output...
> >
> >
> > Hi Guys,
> >
> > I need to generate PDF, PS, and HTML output
> > from my DocBook documents.
> >
> > To include images into my documents, I normally
> > write something like this:
> >
> > ...
> > <mediaobject>
> > <imageobject>
> > <imagedata fileref="myImageFile" format="PNG"/>
> > </imageobject>
> > <textobject>
> > <phrase>My text</phrase>
> > </textobject>
> > </mediaobject>
> > ...
> >
> > I omit the file extension (.png) in the fileref
> > attribute in order to let the processor to generate
> > PDF as well PS output correctly (this works fine).
> >
> > Well, as soon as I try to generate HTML output,
> > I get some troubles. In fact, the generated
> > HTML output for the statements above is
> >
> > ...
> > <div class="mediaobject">
> > <img src="myImageFile" alt="My text">
> > </div>
> > ...
> >
> > As you can see, the file extension (.png) is
> > missing...
> >
> > I'm using XSL stylesheets V 1.58.1.
> >
> > Have you any idea?
--
Giuseppe Greco
Strada Regina 40
6928 Manno (TI)
Switzerland
Mobile: +41 (0) 76 390 60 32
Email : giuseppe.greco@bluewin.ch