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

Subject: Re: [docbook-apps] svg figure role

I feel dumb. I had set use.role.for.mediaobject to zero a while back.
This was before I figured out that I didn't need to be so strict with
the way I was profiling everything and before I figured out that
profile.condition is what I should have been using for profiling in
most cases that aren't covered by the default operation of the

Now, in the xhtml case, the output includes, which produces no image in Firefox.

<img src="Gravimetric_and_Gasometric_Determination_of_Zinc/Vacuum_Flask.svg"
alt="Vacuum Flask"/>

If I manually change the xhtml to read

<object data="Gravimetric_and_Gasometric_Determination_of_Zinc/Vacuum_Flask.svg"

the svg shows up.

It turns out that setting the attribute format="SVG" on the imagedata
tag does this modification, which must be what Bob Stayton is
referring to in his guide at


when he says, "Be sure to include the format="SVG" attribute to ensure
the file is handled properly."

I am wondering, is there a technical reason why outputting an object
tag requires a format attribute on the imagedata tag instead of being
able to guess the format from the fileref attribute?

Again, thanks to Bob S. for his help (and awesome style sheet
programming) - I have no idea how long it would have taken me to
discover the parameter that was causing this behavior if he hadn't
mentioned it by name.

On 4/19/06, Bob Stayton <bobs@sagehill.net> wrote:
> Hi Chris,
> I'm not able to duplicate your problem.  When I process your
> figure element with 1.69.1/xhtml/docbook.xsl, the output file has
> img referencing the svg file.  When I process your figure element
> with 1.69.1/html/docbook.xsl, the output file has img referencing
> the png file.  Reversing the order of the imageobjects inside the
> mediaobject has no effect.  Have you changed the stylesheet
> parameter use.role.for.mediaobject to zero from the default value
> of 1, by any chance?  Selecting by order and not role is the
> behavior you get when that parameter is set to zero.
> When you see a blank, does your output file reference the svg
> file?  If so, then the stylesheet is doing the right thing and it
> seems the problem is with the browser not displaying the embedded
> SVG image.
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
> ----- Original Message -----
> From: "Chris Chiasson" <chris@chiasson.name>
> To: "docbook-apps List" <docbook-apps@lists.oasis-open.org>
> Sent: Tuesday, April 18, 2006 3:31 PM
> Subject: [docbook-apps] svg figure role
> Dear docbook-apps,
> I am trying to make an svg file appear in xhtml output and a png
> file
> appear in html output. I don't believe I have any profile.role =
> blahblah statements in my customization layer or on the command
> line.
> When I order the png image first (along with the html role
> statement),
> both xhtml and html output contain the png file. When I order the
> svg
> image first (along with the xhtml role statement) both xhtml and
> html
> output contain a blank spot where the svg should be. I'm using
> docbook
> xsl 1.69.1.
> ****What's going on here?? How do I make the svg and xhtml pair
> up
> while also pairing the png and html?? Why isn't the svg rendering
> at
> all?****
> note: the files are linked at the bottom.
>       <figure>
>         <title>Vacuum Flask</title>
>         <mediaobject>
>           <imageobject role="html">
>             <imagedata
> fileref="Gravimetric_and_Gasometric_Determination_of_Zinc/Vacuum_Flask.png"/>
>           </imageobject>
>           <imageobject role="xhtml">
>             <imagedata
> fileref="Gravimetric_and_Gasometric_Determination_of_Zinc/Vacuum_Flask.svg"/>
>           </imageobject>
>           <imageobject role="fo">
>             <imagedata
> fileref="Gravimetric_and_Gasometric_Determination_of_Zinc/Vacuum_Flask.eps"/>
>           </imageobject>
>         </mediaobject>
>       </figure>
> Here are links to the relevant files:
> http://chris.chiasson.name/Fuel_Cell_Electrochemistry/Fuel_Cell_Electrochemistry.xhtml
> http://chris.chiasson.name/Fuel_Cell_Electrochemistry/Gravimetric_and_Gasometric_Determination_of_Zinc/Vacuum_Flask.svg
> http://chris.chiasson.name/Fuel_Cell_Electrochemistry/Fuel_Cell_Electrochemistry.html
> http://chris.chiasson.name/Fuel_Cell_Electrochemistry/Gravimetric_and_Gasometric_Determination_of_Zinc/Vacuum_Flask.png
> Thank you for your help,
> --
> http://chris.chiasson.name/
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail:
> docbook-apps-help@lists.oasis-open.org


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