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 08:35:13 UTC