This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] Re: Docbook inlineequation/graphic to html


On Thu, 25 Dec 2003 16:34:03 +0300
"Dimitry V. Ketov" <Dimitry.Ketov@avalon.ru> wrote:

> I'm trying to convert docbook xml -> fo -> html 
> --- my docbook fragment ---
> <inlineequation>
> 	<alt role="tex">p_j^i</alt>
> 	<graphic role="html" fileref="math/1.png" format="PNG"/>
> </inlineequation>
> --- end (my docbook fragment) ---
> using docbook-xsl stylesheets (fresh export from CVS),
> xsltproc, passivetex, dvi2bitmap with the following parameters:
> <xsl:param name="passivetex.extensions">1</xsl:param>
> <xsl:param name="tex.math.in.alt">latex</xsl:param>
> 
> But in resulting html my _inline_ equation is placed into <div>
> element. Grepping through the stylesheets 

You can also use
http://xsldbg.sourceforge.net/
great tool for debugging XSL stylesheets.

> I found this quation template:
> --- equation template ---
>  <xsl:template match="graphic">
>    <xsl:choose>
>     <xsl:when test="../inlineequation">
>        <xsl:call-template name="anchor"/>
>        <xsl:call-template name="process.image"/>
>      </xsl:when>
>     <xsl:otherwise>
>       <div>
>         <xsl:if test="@align">
>           <xsl:attribute name="align">
>             <xsl:value-of select="@align"/>
>           </xsl:attribute>
>         </xsl:if>
>         <xsl:call-template name="anchor"/>
>         <xsl:call-template name="process.image"/>
>       </div>
>     </xsl:otherwise>
>   </xsl:choose>
> </xsl:template>
> --- end (equation template) ---
> It seems that my inlineequation (actually graphic) is placed
> into <div> due to mistake in the <xsl:when
> test="../inlineequation"> test, instead<xsl:when
> test="parent::inlineequation">. Am I wrong?

IMHO, XPath expressions "../inlineequation" and
"parent::inlineequation" are identical:
http://www.w3.org/TR/xpath#path-abbrev
http://www.rol.ru/news/it/helpdesk/xpath01.htm#path-abbrev

<skipped/>

-- 
Regards, Vyt
mailto:  vyt@vzljot.ru
JID:     vyt@vzljot.ru

To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]