W3C home > Mailing lists > Public > spec-prod@w3.org > October to December 2002

RE: html sections in compound documents.

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Fri, 29 Nov 2002 19:56:01 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453DE36@daemsg02.software-ag.de>
To: David Carlisle <davidc@nag.co.uk>, spec-prod@w3.org

And while on the subject, wouldn't it be nice if we had a recursive <div>
element so that sections could be more easily promoted or demoted?

Michael Kay


> -----Original Message-----
> From: David Carlisle [mailto:davidc@nag.co.uk] 
> Sent: 29 November 2002 13:35
> To: spec-prod@w3.org
> Subject: html sections in compound documents.
> 
> 
> 
> 
> 
> If one "logical" document is split up into several html pages 
> on (say) chapter boundaries, should each page be thought of 
> as a complete html document (in particular starting with 
> <h1>) or as part of the logical document so starting at 
> section level <h2> or <h3> depending on the section level at 
> which the document was "chunked"?
> 
> 
> 
> I've normally preferred using <h1> etc.
> The chapters and appendices of the MathML2 (and 1.01 and 1.0) 
>  follow this style.
> 
> While testing production based on the xmlspec slices.xsl 
> stylesheet I note that the generated sectioning level doesn't 
> change when slicing is turned on, so chapters use h2-h5 
> rather than h1-h4 as previously.
> 
> The W3C manual of style doesn't give any guidance on this question.
> 
> 
> It would be useful if the core xmlspec.xsl stylesheet could 
> support this style, currently I have added the following to 
> the mathml customistaion layer, which could replace all the 
> templates in xmlspec.xsl for
>   <xsl:template match="div2/head"> etc.
> It relies on a global parameter  $slice.depth which is set to 
> 1 if you are chunking on div1.
> 
> David
> 
> 
> 
> <!-- HTML HEADING DEPTH -->
> 
>   <xsl:template match="example/head">
>     <xsl:text>&#10;</xsl:text>
>     <xsl:choose>
>       <xsl:when test="$tabular.examples = 0">
>         <div class="exampleHead">
>           <xsl:text>Example: </xsl:text>
>           <xsl:apply-templates/>
>         </div>
>       </xsl:when>
>       <xsl:otherwise>
>     <xsl:variable name="depth"  
> select="count(ancestor::*[contains(name(),'div')])"/>
>     <xsl:variable name="h">
>      <xsl:choose>
>       <xsl:when test="$depth &gt; $slice.depth">
>         <xsl:value-of select="$depth  - $slice.depth"/>
>       </xsl:when>
>       <xsl:otherwise>
>         <xsl:value-of select="$depth"/>
>       </xsl:otherwise>
>      </xsl:choose>
>     </xsl:variable>
>         <xsl:element name="h{$h+1}">
>           <xsl:call-template name="anchor">
>             <xsl:with-param name="node" select=".."/>
>             <xsl:with-param name="conditional" select="0"/>
>           </xsl:call-template>
> 
>           <xsl:text>Example: </xsl:text>
>           <xsl:apply-templates/>
>         </xsl:element>
>       </xsl:otherwise>
>     </xsl:choose>
>   </xsl:template>
> 
>   <xsl:template match="*[contains(name(),'div')]/head">
>     <xsl:text>&#10;</xsl:text>
>     <xsl:variable name="depth"  
> select="count(ancestor::*[contains(name(),'div')])"/>
>     <xsl:variable name="h">
>      <xsl:choose>
>       <xsl:when test="$depth &gt; $slice.depth">
>         <xsl:value-of select="$depth  - $slice.depth"/>
>       </xsl:when>
>       <xsl:otherwise>
>         <xsl:value-of select="$depth"/>
>       </xsl:otherwise>
>      </xsl:choose>
>     </xsl:variable>
>     <xsl:element name="h{$h}">
>       <xsl:call-template name="anchor">
>         <xsl:with-param name="conditional" select="0"/>
>         <xsl:with-param name="node" select=".."/>
>       </xsl:call-template>
>       <xsl:apply-templates select=".." mode="divnum"/>
>       <xsl:apply-templates/>
>       <xsl:if test="parent::inform-div1"> (Non-Normative)</xsl:if>
>     </xsl:element>
>   </xsl:template>
> 
> 
> <!-- END OF HTML HEADING DEPTH -->
> 
> 
> _____________________________________________________________________
> This message has been checked for all known viruses by Star 
> Internet delivered through the MessageLabs Virus Scanning 
> Service. For further information visit 
> http://www.star.net.uk/stats.asp or > alternatively call Star 
> Internet for details on the Virus Scanning Service.
> 
Received on Friday, 29 November 2002 14:06:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:19:12 GMT