<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" style="xslt-template" id="ttml.time.seconds">
 <info>
  <link type="guide" xref="ttml" group="templates"/>
  <link type="guide" xref="templates" group="ttml"/>
  <desc>Return the number of seconds for a time expression.</desc>
  <revision version="3.4" date="2012-03-02" status="final"/>
 </info>
 <title>ttml.time.seconds</title>
 <synopsis>
  <title>Parameters</title>
  <terms>
   <item>
    <title><code>$time</code></title>
    <p>A TTML time expression.</p>
   </item>
  </terms>
 </synopsis>
 <p>This template takes a time expression as used by the <sys>begin</sys>, <sys>end</sys>, and <sys>dur</sys>
 attributes and returns the number of seconds that expression respresents. Time
 expressions may be any number parsable by the XPath <sys>number</sys> function followed
 by one of the units <sys>ms</sys> (milliseconds), <sys>s</sys> (seconds), <sys>m</sys> (minutes), or <sys>h</sys>
 (hours). It returns <sys>0</sys> if the time expression is invalid.</p>
 <p>This template provides support only for the <sys>#time-offset</sys> TTML feature. It
 does not support other methods of specifying times.</p>
</page>
