[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Changing the html tag used for mediaobject videodata
On 11/04/2011 11:01 AM, Joshua Wulf wrote: > G'day, question about xsl. > > Currently <videodata> inside a <mediaobject> renders to the html <embed> > tag. I'd like to render it as <iframe> instead. > > (<embed> works with Chrome, but doesn't work on Firefox 7 on Linux; > <iframe> works with both) > > For example: > > <mediaobject> > <videoobject> > <videodata contentdepth="413" contentwidth="660" > fileref="http://player.vimeo.com/video/30704252?title=0[1844952446]byline=0[1844952446]portrait=0"/> > </videoobject> > <caption/> > </mediaobject> > > currently renders: > > <div class="mediaobject"><embed > src="http://player.vimeo.com/video/30704252?title=0[1844952446]byline=0[1844952446]portrait=0" > width="660" height="413"></embed><div class="caption"></div></div> > > I want it to render as: > > <div class="mediaobject"><iframe > src="http://player.vimeo.com/video/30704252?title=0[1844952446]byline=0[1844952446]portrait=0" > width="660" height="413"></iframe><div class="caption"></div></div> > > Can anyone help out with the way to do this in the xsl? I've had a poke > around in xhtml-common, and found this: > > <xsl:template name="process.image"> > <!-- When this template is called, the current node should be --> > <!-- a graphic, inlinegraphic, imagedata, or videodata. All --> > <!-- those elements have the same set of attributes, so we can --> > <!-- handle them all in one place. > > In there I see: > <!-- imagedata, videodata, audiodata --> > <xsl:call-template name="mediaobject.filename"> > <xsl:with-param name="object" select=".."/> > </xsl:call-template> > > But I can't find a mediaobject.filename template anywhere, and I can't > see where the <embed> tag is being specified. > > Any help appreciated. > > - Josh > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > 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="'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 Is that the right place? I'm trying to figure out how to override this in Publican [2], which is the toolchain I'm using to build my Docbook. I've asked on the Publican list how to override graphics.xsl. Hopefully that's the right piece of xsl that I need to replace with my customization layer. [2] http://jfearn.fedorapeople.org/en-US/Publican/2.6/html-single/Users_Guide/index.html - Josh
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]