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]

[docbook-apps] Problem: Not both textobjects & imageobjects in xsl/html output


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

--
____________________________________________________________
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]