This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to select <imageobject> alternative in <mediaobject>?


What's the proper way to select a different <imageobject> for HTML and
XSL:FO, in a <mediaobject> containing two PNGs?  (actually the same
PNG but with different scaling)

The way I ended up doing it last year, was by misusing the arch
attribute on the imageobjects.

An typical <mediaobject> would look like this:
	<mediaobject>
	  <imageobject arch="html">
	    <imagedata fileref="images/rh72_press_enter.png" format="PNG"/>
	  </imageobject>
	  <imageobject arch="pdf">
	    <imagedata fileref="images/rh72_press_enter.png" format="PNG"
	    depth="5cm" scalefit="1"/>
	  </imageobject>
	</mediaobject>

Then I run the attached local-profile.xsl style sheet through Saxon,
with the argument "arch=pdf", to create an intermediate DocBook XSL
document, which in turn is formatted to XSL:FO using the DocBook XSL
style sheets, and finally turned into PDF using Fop.

This works, but I don't like this for several reasons:
 1. it is misusing the "arch" attribute.  However I can't use the more
    natural "role" for profiling, since I'm using it to get bold for
    the <emphasis> contents
 2. it is not semantic markup.  It mixes final processing with the
    markup 
 3. it confuses semi-wysiwig editors like xxe and (presumably) Lyx,
    they show both images, without an indicator that they are
    alternatives 
 4. it requires an extra processing steps, with extra intermediate
    files cluttering up things

Thanx!


- Steinar


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]