List Info

Thread: Height and Width Tags in XHTML Transformations




Height and Width Tags in XHTML Transformations
user name
2007-02-20 11:04:11

docbook-rnc-5.0CR1 xsl-1.72.0 oxygen-8.1.0 (eclipse-3.2.1 plugin)

 

How does one apply height and width tags to admonition images for subsequent xhtml transformations (just got cited by the web police J )

 

Ray

 

Re: Height and Width Tags in XHTML Transformations
user name
2007-02-20 11:44:39
There is a template mode for setting admonition graphic width (not for height, though).  See:
 
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting
sagehill.net">bobssagehill.net
 
 ;
----- Original Message -----
Sent: Tuesday, February 20, 2007 9:04 AM
Subject: [docbook-apps] Height and Width Tags in XHTML Transformations

docbook-rnc-5.0CR1 xsl-1.72.0 oxygen-8.1.0 (eclipse-3.2.1 plugin)

 

How does one apply height and width tags to admonition images for subsequent xhtml transformations (just got cited by the web police J )

 

Ray

 

RE: Height and Width Tags in XHTML Transformations
user name
2007-02-20 15:52:56

>> 

There is a template mode for setting admonition graphic width (not for height, though).  See:

 

 

<<&nbsp;

 

Extended the ../xhtml/admon.xsl template as follows; works perfectly:

 

 

<xsl:template match="*&quot; mode=";admon.graphic.width&quot;>

 &nbsp;  &lt;xsl:param name=";node" select=&quot;."/>

 &nbsp;  &lt;xsl:text>25</xsl:text>;

</xsl:template>

<xsl:template match="*&quot; mode=";admon.graphic.height&quot;>

 &nbsp;  &lt;xsl:param name=";node" select=&quot;."/>

 &nbsp;  &lt;xsl:text>25</xsl:text>;

</xsl:template>

 

<xsl:template name="graphical.admonition";>

 &nbsp;…

  …

   &nbsp; &nbsp; &nbsp;<td rowspan=&quot;2" align=&quot;center&quot; valign=&quot;top";>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <xsl:attribute name=";width";>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; <xsl:apply-templates select=&quot;." mode=";admon.graphic.width&quot;/>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; </xsl:attribute&gt;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <xsl:attribute name=";height&quot;>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; <xsl:apply-templates select=&quot;." mode=";admon.graphic.height&quot;/>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; </xsl:attribute&gt;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <img alt="[{$alt}]&quot;>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; <xsl:attribute name=";src"&gt;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; <xsl:call-template name=";admon.graphic"/&gt;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; </xsl:attribute>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; </img>

 &nbsp; &nbsp; &nbsp;  ; </td>

 &nbsp;…

 &nbsp;…

</xsl:template>

 

Can this code be rolled into the next snapshot or release?

 

Will the same be an issue with nav graphics (not currently using nav graphics) and if so, will a similar solution suffice?

 

Thanks again.

 

Ray

 

 

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )