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] | [Elist Home]


Subject: DOCBOOK-APPS: FREQ: Stylesheet mechanism to specify imageobject format


Norm,

[ OK, this primarily a personal message to Norm, but I thought input from
  others would be a good idea.  "FREQ" == "Feature Request" ]

Firstly, I think we need a mechanism in the stylesheets to specify, when 
processing a <mediaobject>, which <imageobject> should be used, based on 
the format attribute.

At the moment, you can't use

   <mediaboject>
     <imageobject><imagedata fileref="foo.gif" format="gif"></imageobject>

     <imageobject><imagedata fileref="foo.eps" format="eps"></imageobject>

     <imageobject><imagedata fileref="foo.png" format="png"></imageobject>
   </mediaobject>

as the Print stylesheets have no way of knowing whether to use foo.eps
(which you need if the .tex output file is going to be turned in to 
Postscript) or foo.png (which you need if the .tex output file is going
to be turned in to PDF).

I know the DocBook spec says that the processing application is supposed
to use the <imageobject> it thinks is best, but I think we need a way to
give it a helping hand.  At the moment, I'm going to have to do nasty 
things with "INCLUDE"/"IGNORE" parameter entities in the document source.

There might be some way to do this already, but I don't see how.

Secondly, I think we also need a way to tell the stylesheets that the 
output format does not support images, and that the contents of the 
<textobject> (if it exists) should always be used.

For example, suppose you have

    <mediaobject>
      <imageobject><imagedata fileref="foo.gif" format="gif"></imageobject>

      <textobject>
        <para>A picture of a foo.</para>
      </textobject>
    </mediaobject>

If you convert that to HTML then everything's fine, and you get HTML that
looks something like

    <img src="foo.gif" alt="A picture of a foo.">

However, this is not quite optimal when the only reason you're generating
the HTML is so that you can use "lynx -dump" or "html2text" to convert the
document to plain text.  Partly because some text based browsers will include
a reference to the image, even if they can't display it (which is confusing
to readers), and partly because <textobject> can contain multiple <para>s,
while the alt attribute can't.

So, a flag to the stylesheets that instruct them to ignore any <imageobject>s
and always use the <textobject> would be handy.

Thoughts?

N
-- 
Internet connection, $19.95 a month.  Computer, $799.95.  Modem, $149.95.
Telephone line, $24.95 a month.  Software, free.  USENET transmission,
hundreds if not thousands of dollars.  Thinking before posting, priceless.
Somethings in life you can't buy.  For everything else, there's MasterCard.
  -- Graham Reed, in the Scary Devil Monastery


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


Powered by eList eXpress LLC