OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] XSL customization for HTML output (<EMBED>)


Here is a customization that does what you want.  The XML file is supplying
only the name of the movie file.  The rest is coming from the stylesheet.
I'm not clear if that is flexible enough for your needs or not.

<xsl:template match="mediaobject[videoobject[@role='html']]">

  <xsl:variable name="olist" select="videoobject"/>

  <xsl:variable name="object.index">
    <xsl:call-template name="select.mediaobject.index">
      <xsl:with-param name="olist" select="$olist"/>
      <xsl:with-param name="count" select="1"/>
    </xsl:call-template>
  </xsl:variable>

  <xsl:variable name="object" select="$olist[position() = $object.index]"/>

  <xsl:variable name="filename">
    <xsl:call-template name="mediaobject.filename">
      <xsl:with-param name="object" select="$object"/>
    </xsl:call-template>
  </xsl:variable>

  <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
          WIDTH="375"
          HEIGHT="400"
          CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab";>
    <PARAM name="SRC" VALUE="file:{$filename}"/>
    <PARAM name="AUTOPLAY" VALUE="true"/>
    <PARAM name="CONTROLLER" VALUE="true"/>
    <PARAM name="LOOP" VALUE="TRUE"/>
    <PARAM name="SCALE" value="ASPECT"/>
    <div class="mediaobject">
      <embed src="file:{$filename}"
             width="375"
             height="400"
             scale="aspect"
             autoplay="true"
             controller="true"
             loop="true"
             PLUGINSPAGE="http://www.apple.com/quicktime/download/"/>
    </div>
  </OBJECT>

</xsl:template>


Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Tristan Fiedler" <fiedler@cshl.edu>
To: "docbook-apps" <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, January 19, 2005 1:05 PM
Subject: [docbook-apps] XSL customization for HTML output (<EMBED>)


> Hi All,
>
> I have tested a variety of combinations of contentdepth, contentwidth,
> depth, width, scale, scalefit, etc. attributes for the videodata
> element shown below with no luck.
>
> <!ENTITY video1 SYSTEM "/Mosaics/test_quicktime.mov" NDATA MOV>
> ....
> <mediaobject>
> <videoobject role="html">
> <videodata entityref="video1"/>
> </videoobject>
> </mediaobject>
>
> I want my HTML output to be :
>
> <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
> WIDTH="375"HEIGHT="400"
> CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab";>
> <PARAM name="SRC" VALUE="file:/Mosaics/test_quicktime.mov">
> <PARAM name="AUTOPLAY" VALUE="true">
> <PARAM name="CONTROLLER" VALUE="true">
> <PARAM name="LOOP" VALUE="TRUE">
> <PARAM name="SCALE" value="ASPECT">
> <div class="mediaobject">
>              <embed src="file:/Mosaics/test_quicktime.mov"
>     width="375" height="400" scale="aspect" autoplay="true"
> controller="true" loop="true"
> PLUGINSPAGE="http://www.apple.com/quicktime/download/";>
>     </embed>
>           </div>
> </OBJECT>
>
> rather than the "default"  of :
>
>           <div class="mediaobject">
>              <embed
> src="file:/Users/fiedler/Celegans_DocBook/Samples/Mosaics/
> test_quicktime.mov"></embed>
>           </div>
>
> How can the stylesheets be modified to do this
>
> 1. set the width, height, scale, autoplay, controller & loop attributes
> for the <embed> element
> 2. include all of the information for the <OBJECT> element.
>
>
> Cheers,        Tristan
> ------------------------------
> Tristan J. Fiedler
> Postdoctoral Fellow - Stein Lab
> Cold Spring Harbor Laboratory
>
>
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]