Fixed timeContainer. Added various tests for lengths. Changed style namespace
--- a/testsuite/Report/report.xslt Tue Feb 10 13:53:10 2009 +0000
+++ b/testsuite/Report/report.xslt Tue Feb 10 13:54:19 2009 +0000
@@ -3,7 +3,7 @@
version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tt="http://www.w3.org/2006/10/ttaf1"
- xmlns:tts="http://www.w3.org/2006/10/ttaf1#style"
+ xmlns:tts="http://www.w3.org/2006/10/ttaf1#styling"
xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata"
xmlns:ttp="http://www.w3.org/2006/10/ttaf1#parameter"
xmlns="http://www.w3.org/1999/xhtml"
@@ -548,6 +548,30 @@
<td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:fontSize[t:isLength(.)])'/></xsl:call-template></td>
</tr>
<tr>
+ <th>@tts:fontSize="<% length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.10</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:fontSize[t:isPercentLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:fontSize[t:isPercentLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:fontSize="<px length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.10</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:fontSize[t:isPxLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:fontSize[t:isPxLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:fontSize="<em length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.10</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:fontSize[t:isEmLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:fontSize[t:isEmLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:fontSize="<c length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.10</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:fontSize[t:isCLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:fontSize[t:isCLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
<th>@tts:fontSize="<length> <length>"</th>
<td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.10</xsl:with-param></xsl:call-template></td>
<td><xsl:value-of select='count($tests/tt:tt[.//@tts:fontSize[t:isDoubleLength(.)]])'/></td>
@@ -638,6 +662,30 @@
<td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:lineHeight[t:isLength(.)])'/></xsl:call-template></td>
</tr>
<tr>
+ <th>@tts:lineHeight="<% length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.13</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:lineHeight[t:isPercentLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:lineHeight[t:isPercentLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:lineHeight="<px length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.13</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:lineHeight[t:isPxLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:lineHeight[t:isPxLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:lineHeight="<em length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.13</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:lineHeight[t:isEmLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:lineHeight[t:isEmLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:lineHeight="<c length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.13</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:lineHeight[t:isCLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:lineHeight[t:isCLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
<th>@tts:lineHeight="inherit"</th>
<td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.13</xsl:with-param></xsl:call-template></td>
<td><xsl:value-of select='count($tests/tt:tt[.//@tts:lineHeight="inherit"])'/></td>
@@ -728,6 +776,30 @@
<td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:padding[t:isLength(.)])'/></xsl:call-template></td>
</tr>
<tr>
+ <th>@tts:padding="<% length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.17</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:padding[t:isPercentLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:padding[t:isPercentLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:padding="<px length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.17</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:padding[t:isPxLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:padding[t:isPxLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:padding="<em length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.17</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:padding[t:isEmLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:padding[t:isEmLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
+ <th>@tts:padding="<c length>"</th>
+ <td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.17</xsl:with-param></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@tts:padding[t:isCLength(.)]])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:padding[t:isCLength(.)])'/></xsl:call-template></td>
+ </tr>
+ <tr>
<th>@tts:padding="<length> <length>"</th>
<td><xsl:call-template name='toc'><xsl:with-param name='section'>8.2.17</xsl:with-param></xsl:call-template></td>
<td><xsl:value-of select='count($tests/tt:tt[.//@tts:padding[t:isDoubleLength(.)]])'/></td>
@@ -1190,16 +1262,16 @@
<td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@timeContainer)'/></xsl:call-template></td>
</tr>
<tr>
- <th>@tts:timeContainer="par"</th>
+ <th>@timeContainer="par"</th>
<td><xsl:call-template name='toc'><xsl:with-param name='section'>10.2.4</xsl:with-param></xsl:call-template></td>
- <td><xsl:value-of select='count($tests/tt:tt[.//@tts:timeContainer="par"])'/></td>
- <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:timeContainer[.="par"])'/></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@timeContainer="par"])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@timeContainer[.="par"])'/></xsl:call-template></td>
</tr>
<tr>
- <th>@tts:timeContainer="seq"</th>
+ <th>@timeContainer="seq"</th>
<td><xsl:call-template name='toc'><xsl:with-param name='section'>10.2.4</xsl:with-param></xsl:call-template></td>
- <td><xsl:value-of select='count($tests/tt:tt[.//@tts:timeContainer="seq"])'/></td>
- <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@tts:timeContainer[.="seq"])'/></xsl:call-template></td>
+ <td><xsl:value-of select='count($tests/tt:tt[.//@timeContainer="seq"])'/></td>
+ <td><xsl:call-template name='display'><xsl:with-param name='n' select='count($tests//@timeContainer[.="seq"])'/></xsl:call-template></td>
</tr>
<tr>
<th>tt:set</th>
@@ -1373,6 +1445,26 @@
<xsl:value-of select='matches($s, "^(\+|-)?\d+(\.\d+)?(px|em|c|%)$")'/>
</xsl:function>
+ <xsl:function name="t:isPxLength" as="xs:boolean">
+ <xsl:param name='s' as="xs:string"/>
+
+ <xsl:value-of select='matches($s, "^(\+|-)?\d+(\.\d+)?px$")'/>
+ </xsl:function>
+ <xsl:function name="t:isPercentLength" as="xs:boolean">
+ <xsl:param name='s' as="xs:string"/>
+
+ <xsl:value-of select='matches($s, "^(\+|-)?\d+(\.\d+)?%$")'/>
+ </xsl:function>
+ <xsl:function name="t:isEmLength" as="xs:boolean">
+ <xsl:param name='s' as="xs:string"/>
+
+ <xsl:value-of select='matches($s, "^(\+|-)?\d+(\.\d+)?em$")'/>
+ </xsl:function>
+ <xsl:function name="t:isCLength" as="xs:boolean">
+ <xsl:param name='s' as="xs:string"/>
+
+ <xsl:value-of select='matches($s, "^(\+|-)?\d+(\.\d+)?c$")'/>
+ </xsl:function>
<xsl:function name="t:isDoubleLength" as="xs:boolean">
<xsl:param name='s' as="xs:string"/>