Ack, no, they do not use imagedata. I didn't grasp the context when I responded. Your solution is more appropriate here.
Looking more closely, it would seem that if the user set 'use.embed.for.svg', and they specify svg for any generated images, then the stylesheet should handle the generated admonition SVGs in the same way. But I'm not sure <embed> is the right way, for either. I thought embed was a proprietary element that was used out of necessity, but now I see that it is being added into HTML 5 (which is not yet a standard). Is DocBook's use of <embed> for SVG incorrect, to be replaced by <object>? Bob Stayton Sagehill Enterprises [email protected] ----- Original Message ----- From: [email protected] To: [email protected] ; [email protected] ; [email protected] Sent: Friday, March 26, 2010 10:29 AM Subject: Re: [docbook-apps] SVG admonitions for browsers. Bob, Do the HTML admonitions use an imagedata? In my testing I could not get an object wrapper on the HTML admons without resorting to changes in the template, even using "use.embed.for.svg ". So I am assuming that only applies to imagedata objects and not admons? Regards, Dean Nelson In a message dated 3/26/2010 8:48:00 A.M. Pacific Daylight Time, [email protected] writes: This will work, and will give you complete control over the object parameters. But the HTML stylesheets will automatically generate an object element for imagedata elements whose format attribute is set to "SVG". For details, see: http://www.sagehill.net/docbookxsl/SVGimages.html#SvgHtml Bob Stayton Sagehill Enterprises [email protected] ----- Original Message ----- From: [email protected] To: [email protected] ; [email protected] ; [email protected] Sent: Thursday, March 25, 2010 11:34 AM Subject: Re: [docbook-apps] SVG admonitions for browsers. Xuan, You will need to embed the <img> into an <object>. To do this you will need to copy the template called "graphical.admonition" from the admon.xsl in the html directory to your own customization layer. Then look for the following lines: <img alt="[{$alt}]"> <xsl:attribute name="src"> <xsl:call-template name="admon.graphic"/> </xsl:attribute> </img> and change it to something like (this is untested code): <object type="image/svg+xml" width="80" class="img"> <xsl:attribute name="data"> <xsl:call-template name="admon.graphic"/> </xsl:attribute> <img alt="[{$alt}]"> <xsl:attribute name="src"> <xsl:call-template name="admon.graphic"/> </xsl:attribute> </img> </object> This will allow FF to load SVG as an external file. You may need to add some extra code to detect when you are actually using SVG files and extra code to set the size of the image since it is hardcoded. Regards, Dean Nelson In a message dated 3/25/2010 8:49:09 A.M. Pacific Daylight Time, [email protected] writes: In your param.xsl file, copy and modify the following lines : <xsl:param name="admon.graphics.extension">.png</xsl:param> <xsl:param name="admon.graphics" select="0"/> <xsl:param name="admon.graphics.path">images/</xsl:param> <xsl:param name="admon.textlabel" select="1"/> to <xsl:param name="admon.graphics.extension">.svg</xsl:param> <xsl:param name="admon.graphics" select="1"/> <xsl:param name="admon.graphics.path">images/</xsl:param> (default images/ or your_path/ ) <xsl:param name="admon.textlabel" select="1"/> Cordialement, ____________________________________________ Christopher COMPAGNON AXA GROUP SOLUTIONS - Procurement, BI Supply Département Solutions Business Intelligence Domaine BI France - Reporting Opérationnel ( 01 44 45 04 16 (55 04 16) E-mail: [email protected] ____________________________________________ Pensez à l'environnement avant d'imprimer ce message -----Message d'origine----- De : Xuan Ngo [mailto:[email protected]] Envoyé : mercredi 24 mars 2010 19:39 À : Docbook Appz; Compagnon Christopher Objet : RE: [docbook-apps] SVG admonitions for browsers. Sorry, maybe I wasn't clear. When I was referring to admonitions, I was referring to <warning>, <note> and <tip> tags. I know that by using <mediaobject>, it works correctly with Firefox. I want <warning>, <note> and <tip> tags to appear in Firefox as SVG. How would I do that? Xuan. --- On Wed, 3/24/10, Compagnon Christopher <[email protected]> wrote: > From: Compagnon Christopher <[email protected]> > Subject: RE: [docbook-apps] SVG admonitions for browsers. > To: "Xuan Ngo" <[email protected]>, "Docbook Appz" <[email protected]> > Received: Wednesday, March 24, 2010, 11:54 AM > Hi, > > To generate image object with docbook, test with : > > <mediaobject> > <imageobject> > <imagedata fileref="img/my_image.svg" format="SVG"/> > </imageobject> > </mediaobject> > > Does it work ? > > Cordialement, > > ____________________________________________ > Christopher COMPAGNON > AXA GROUP SOLUTIONS - Procurement, BI Supply > Département Solutions Business Intelligence > Domaine BI France - Reporting Opérationnel > ( 01 44 45 04 16 (55 04 16) > E-mail: [email protected] > ____________________________________________ > Pensez à l'environnement avant d'imprimer ce message > > > -----Message d'origine----- > De : Xuan Ngo [mailto:[email protected]] > > Envoyé : mercredi 24 mars 2010 16:44 > À : Docbook Appz > Objet : [docbook-apps] SVG admonitions for browsers. > > I'm generating HTML out of docbook and SVG admonitions are > generated as <img>. This causes the Firefox to not > render the svg. > > Is there a way to generated svg admonitions like it did for > <mediaobject>? > > Xuan. > > > > __________________________________________________________________ > Looking for the perfect gift? Give the gift of Flickr! > > http://www.flickr.com/gift/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > __________________________________________________________________ Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
