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 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, christopher.compagnon.alti@axa-groupsolutions.com 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: christopher.compagnon.alti@axa-groupsolutions.com

____________________________________________

Pensez à l'environnement avant d'imprimer ce message

 

 

-----Message d'origine-----
De : Xuan Ngo [mailto:xuanngolist@yahoo.ca]
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 <christopher.compagnon.alti@axa-groupsolutions.com> wrote:

 

> From: Compagnon Christopher <christopher.compagnon.alti@axa-groupsolutions.com>

> Subject: RE: [docbook-apps] SVG admonitions for browsers.

> To: "Xuan Ngo" <xuanngolist@yahoo.ca>, "Docbook Appz" <docbook-apps@lists.oasis-open.org>

> 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: christopher.compagnon.alti@axa-groupsolutions.com

> ____________________________________________

> Pensez à l'environnement avant d'imprimer ce message

>

> -----Message d'origine-----

> De : Xuan Ngo [mailto:xuanngolist@yahoo.ca]

>

> 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: docbook-apps-unsubscribe@lists.oasis-open.org

> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

>

>

 

 

      __________________________________________________________________

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/

 



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