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]

Re: [docbook-apps] Problem: Not both textobjects & imageobjects inxsl/html output


Oy. My bad. I'm embarassed. Should've RTFM:)

Thanks,
Mark

Chris Moller wrote:
That's the way it's supposed to work. From The Book:

-------------------------------------------------------------------------------------

The primary purpose of the MediaObject <http://docbook.org/tdg/en/html/mediaobject.html> is to provide a wrapper around a set of alternative presentations of the same information.

If possible, the processing system should use the content of the first object within the MediaObject <http://docbook.org/tdg/en/html/mediaobject.html>. If the first object cannot be used, the remaining objects should be considered in the order that they occur. A processor should use the first object that it can, although it is free to choose any of the remaining objects if the primary one cannot be used.

Under no circumstances should more than one object in a MediaObject <http://docbook.org/tdg/en/html/mediaobject.html> be used or presented at the same time.

For example, a MediaObject <http://docbook.org/tdg/en/html/mediaobject.html> might contain a video, a high resolution image, a low resolution image, a long text description, and a short text description. In a “high end” online system, the video is used. For print publishing, the high resolution image is used. For other online systems, either the high or low resolution image is used, possibly including the short text description as the online alternative. In a text-only environment, either the long or short text descriptions are used.

------------------------------------------------------------------------------------



Mark Johnson wrote:

Hi All,

When generating html output, the xsl stylesheets will only render the first <*object> within a <mediaobject>.

For example,

    <mediaobject>
      <textobject>
         <para>some text</para>
      </textobject>

      <imageobject>
    <imagedata fileref="graphic.png"/>
      </imageobject>
    </mediaobject>

only outputs the <textobject> content. When I reverse the order:

    <mediaobject>
      <imageobject>
    <imagedata fileref="graphic.png"/>
      </imageobject>

      <textobject>
         <para>some text</para>
      </textobject>
    </mediaobject>

only the graphic gets rendered.

Is this the intended behavior? (Smells like a bug.)

However, I *can* output the combos imageobject/caption or textobject/caption, so that I can place text above or below the graphic. But this approach/hack only allows me to use one block of text within the mediaobject, when I really want to have the option of rendering a text object both before & after a imageobject.

Any insights?

Slight digression below
-----------------------

FWIW, I found a simple hack to (globally) move the <caption> so it appears before the imageobject by simply reversing the order of the statements

    <xsl:apply-templates select="$object"/>
    <xsl:apply-templates select="caption"/>

in the file html/graphics.xsl.

Thanks,
Mark


--


*Christian H. L. Moller*
/President/
Moller Software Development Services, LLC


moller@mollerware.com
919.367.8689 (Vioce)
919.367.9097 (Fax)

-- ____________________________________________________________ Mark Johnson <mrj@debian.org> Debian XML/SGML: <http://debian-xml-sgml.alioth.debian.org> Home Page: <http://dulug.duke.edu/~mark/> GPG fp: DBEA FA3C C46A 70B5 F120 568B 89D5 4F61 C07D E242


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