[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] svg figure role
The SVG I am working with has no intrinsic size. I see that by specifying contentwidth and contentdepth (?? height??) I can obtain a larger or smaller picture than to what Firefox defaults. If I specify contentwidth or contentdepth in inches, I notice that the xhtml output has been changed to a number of pixels. The conversion factor appears to be 90 pixels per inch. Grepping the stylesheet distribution for "90" reveals this is associated with a parameter called "pixels.per.inch". My display is calibrated to 86 ppi (the physical ppi of the monitor at this resolution and the ppi at which I have set Windows to render the screen). I will probably change pixels.per.inch to 86 in the stylesheet customization layer. However, this won't help people with displays that have a different dpi. Why is it that the stylesheet writes the final size of the image in pixels? Is there a way to turn this behavior off? On 4/19/06, Chris Chiasson <chris@chiasson.name> wrote: > 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 > stylesheets. > > 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" > type="image/svg+xml"/> > > 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 > > http://www.sagehill.net/docbookxsl/SVGimages.html > > 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 > > > > > > > > > > > > > -- > http://chris.chiasson.name/ > -- http://chris.chiasson.name/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]