From: SourceForge.net <no...@so...> - 2008-11-16 12:52:50
|
Bugs item #2298384, was opened at 2008-11-16 13:52 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=2298384&group_id=21935 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: XSL Group: output: print/FO/PDF Status: Open Resolution: None Priority: 5 Private: No Submitted By: skripi (skripi) Assigned to: Nobody/Anonymous (nobody) Summary: xsl 1.74 ignores mediaobject inside table environment Initial Comment: today i noticed that docbook xsl stylesheets in 1.74 ignore a mediaobject. According to the DTD a mediaobject is allowed inside a table environment: table ::= (((blockinfo?, (title,titleabbrev?), (indexterm)*, textobject*, (graphic+|mediaobject+|tgroup+))| (caption, (col*|colgroup*), thead?,tfoot?, (tbody+|tr+)))) So i had something like <table> <title>test</title> <mediaobject> ... </mediaobject> </table> Looking at the xsl stylesheet (quoted below) i found that one template calls another for 'tgroup|mediaobject|graphic', but the later did not process any mediaobject environment, only tgroups. I added to the later stylesheet the following before </xsl:template> ---------------- <xsl:for-each select="mediaobject"> <xsl:apply-templates select="."/> </xsl:for-each> ---------------- Which restults that the picture appears as table. ------------------------------------------- <!-- ==================================================================== --> <xsl:template name="make.table.content"> <xsl:choose> <xsl:when test="tgroup|mediaobject|graphic"> <xsl:call-template name="calsTable"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="." mode="htmlTable"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- =================================================================== --> <!-- ==================================================================== --> <xsl:template name="calsTable"> <xsl:variable name="keep.together"> <xsl:call-template name="pi.dbfo_keep-together"/> </xsl:variable> <xsl:for-each select="tgroup"> <fo:table xsl:use-attribute-sets="table.table.properties"> <xsl:if test="$keep.together != ''"> <xsl:attribute name="keep-together.within-column"> <xsl:value-of select="$keep.together"/> </xsl:attribute> </xsl:if> <xsl:call-template name="table.frame"/> <xsl:if test="following-sibling::tgroup"> <xsl:attribute name="border-bottom-width">0pt</xsl:attribute> <xsl:attribute name="border-bottom-style">none</xsl:attribute> <xsl:attribute name="padding-bottom">0pt</xsl:attribute> <xsl:attribute name="margin-bottom">0pt</xsl:attribute> <xsl:attribute name="space-after">0pt</xsl:attribute> <xsl:attribute name="space-after.minimum">0pt</xsl:attribute> <xsl:attribute name="space-after.optimum">0pt</xsl:attribute> <xsl:attribute name="space-after.maximum">0pt</xsl:attribute> </xsl:if> <xsl:if test="preceding-sibling::tgroup"> <xsl:attribute name="border-top-width">0pt</xsl:attribute> <xsl:attribute name="border-top-style">none</xsl:attribute> <xsl:attribute name="padding-top">0pt</xsl:attribute> <xsl:attribute name="margin-top">0pt</xsl:attribute> <xsl:attribute name="space-before">0pt</xsl:attribute> <xsl:attribute name="space-before.minimum">0pt</xsl:attribute> <xsl:attribute name="space-before.optimum">0pt</xsl:attribute> <xsl:attribute name="space-before.maximum">0pt</xsl:attribute> </xsl:if> <xsl:apply-templates select="."/> </fo:table> </xsl:for-each> </xsl:template> <!-- ==================================================================== --> P.S.: This may apply to html output as well ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=2298384&group_id=21935 |