Re: Use the role attribute to select <mediaobject>

James Devenish <[email protected]> Tue, 18 Mar 2003 17:31:24 +0800
Newsgroups gmane.text.docbook.db2latex.devel
Message-ID <[email protected]>
Hi,

In message <[email protected]>
on Mon, Mar 17, 2003 at 09:44:48PM +0100, Steinar Bang wrote:
> >From v1.60.1, the DocBook XSL style sheets started using the role
> attribute to select which <mediaobject> alternative to select for a
> given result format.
> 
> This makes it possible to eg. pick a different (higher resolution, or
> scaled) PNG for XSL:FO, than for HTML.

There has also been some off-list correspondence about this. Some
thoughts of mine:

 - Mediaobjects can contain imageobjects. In the case that imageobjects
   are present, DB2LaTeX is unable to choose the correct file formats
   because it does not know what typesetter you are going to use.
 - If we are to support $use.role.for.mediaobject and
   $preferred.mediaobject.role, we would have to choose a role (such
   as the existing 'html' or 'fo') that corresponds to DB2LaTeX/LaTeX.

There are at least three places where the correct image data format can
be chosen:

 - at the level of mediaobjects (using $preferred.mediaobject.role).
 - at the level of imagedata's @format attribute.
 - at the level of "filename extensions" in imagedata's @fileref
   attributed (of course, this should not really be the way it is
   done, though existing DocBook stylesheets sometimes let authors
   rely on this).

Personally, I think any of these requires either:

 - user intervention (e.g. that the user uses a driver file to define the
   allowed imagedata @formats).
 - election of a mediaobject role that is devoted to LaTeX/DB2LaTeX and
   to have users OMIT the filename extension (e.g. ".eps") so that LaTeX
   picks up the default file type. LaTeX users will know that LaTeX and
   pdfLaTeX can choose the correct image formats (e.g. choose between
   "fig2.eps", "fig2.eps", "fig2.png") if the author uses
   \includegraphics{fig} (i.e. leaves off the extension).

Thoughts?




-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en