[publican-list] Help with xsl customization
Jeff Fearn
jfearn at redhat.com
Mon Nov 7 23:50:23 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>
>
> [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?
In your html.xsl file add:
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/xhtml/graphics.xsl"/>
to the list of other imports.
Copy your videodata template in to html.xsl.
Delete your graphics.xsl file.
Rebuild brand.
Cheers, Jeff.
--
"Reply All" why you shouldn't use it:
http://www.emailreplies.com/#12replytoall
More information about the publican-list
mailing list