[publican-list] Help with xsl customization

Joshua Wulf jwulf at redhat.com
Fri Nov 4 07:07:44 UTC 2011


On 11/04/2011 05:05 PM, Joshua Wulf wrote:
> I'm trying to create a custom brand that renders
> <mediaobject><videoobject> in html as <iframe>, rather than <embed>.
> 
> I've found what I think is the xsl that applies this tag, in
> graphics.xsl [1]:
> 
> <xsl:template match="videodata">
>   <xsl:call-template name="process.image">
>     <xsl:with-param name="tag" select="'iframe'"/>
>     <xsl:with-param name="alt">
>       <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
>     </xsl:with-param>
>   </xsl:call-template>
> </xsl:template>
> 
Sorry, that should be "embed" above, rather than "iframe":

<xsl:template match="videodata">
  <xsl:call-template name="process.image">
    <xsl:with-param name="tag" select="'embed'"/>
    <xsl:with-param name="alt">
      <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
    </xsl:with-param>
  </xsl:call-template>
</xsl:template>



> [1] http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/graphics.xsl
> 
> I'm not sure where this is imported in publican. It's not in
> publican/datadir/xsl.
> 
> I've created a publican brand [2] with a graphics.xsl file in it, with
> the following contents:
> 
> <?xml version='1.0'?>
> <xsl:stylesheet
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
> 
>     <xsl:import
> href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
>     <xsl:import
> href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/graphics.xsl"/>
> 
> <xsl:template match="videodata">
>   <xsl:call-template name="process.image">
>     <xsl:with-param name="tag" select="'iframe'"/>
>     <xsl:with-param name="alt">
>       <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
>     </xsl:with-param>
>   </xsl:call-template>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> [2] https://svn.devel.redhat.com/repos/ecs/toolkit/publican-redhat-video
> 
> This doesn't work, though.
> 
> Anyone know how to do this?
> 
> - Josh
> 
> _______________________________________________
> publican-list mailing list
> publican-list at redhat.com
> https://www.redhat.com/mailman/listinfo/publican-list
> Wiki: https://fedorahosted.org/publican


-- 
Give us your feedback on JBoss Enterprise Documentation, take the key
survey:
http://www.keysurvey.com/survey/361436/1065/




More information about the publican-list mailing list