- From: Philippe Le Hegaret <plh@w3.org>
- Date: 19 Jun 2003 14:51:19 -0400
- To: spec-prod@w3.org
The WSD WG is using a modified (*sic*) version of the xmlspec.xsl, so I cannot do an easy synchronization. Anyway, 2 things that editors like to have are, I think, worth the consideration for xmlspec.xsl: - Graphic captions - numbering of tables, graphics, and examples. - Links to tables, graphics, and examples. 1- Graphic captions: 2 solutions are possible: - Add a child element caption to the graphic element (but it is unnecessary imho). - WSD is now using the alt attribute for the caption: <p style='text-align:left'> <i><span><xsl:text>Figure </xsl:text> <xsl:apply-templates select="." mode="divnum"/> <xsl:text>. </xsl:text></span> <xsl:value-of select="@alt"/></i> </p> For an example, see http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/wsdl12/wsdl12.html?rev=1.39&content-type=text/html#serviceresfig1 2- numbering of tables, graphics, and examples. I adopted the O'Reilly style to have numbers on the graphics, examples, and tables: <xsl:template mode="divnum" match="graphic"> <xsl:number level="multiple" count="div1" format="1"/> <xsl:text>-</xsl:text> <xsl:number level="any" from='div1' count="graphic" format="1"/> </xsl:template> <xsl:template mode="divnum" match="back//graphic"> <xsl:number level="multiple" count="div1 | inform-div1" format="A"/> <xsl:text>-</xsl:text> <xsl:number level="any" from='div1 | inform-div1' count="graphic" format="1"/> </xsl:template> (ditto for table and example) 3. Links to tables, graphics, and examples use the same approach: <xsl:when test="local-name($target) = 'graphic'"> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="target" select="id(@ref)"/> </xsl:call-template> </xsl:attribute> <xsl:text>Figure </xsl:text> <xsl:apply-templates select="id(@ref)" mode="divnum"/> </a> </xsl:when> At the same time, I also changed the captions handling for examples and tables to match O'Reilly style: the caption appears before, in italic, in a normal font-size, and aligned to the left. For graphic, the caption appears after the image. Philippe
Received on Thursday, 19 June 2003 14:51:20 UTC