Subject: Re: [xsl] Grouping problem. 2.0|
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Fri, 04 Jul 2008 19:05:02 +0100
I didn't want the nesting (it's to move on to docbook simplesect elements next, which need to be at para level)
surely in docbook you'd normally nest sections though wouldn't you? Your expect section (or simplesect) for section 2.2.2 to be at the smae levelas para for section 2.2, that is, inside the section for 2.2.
The overview is to take the 1.2 spec and generate a number of docbook sections each containing
<simplesect> <title>3. Para </title> <para role='link'> <link xlink:href='&specx;2.8'>spec</link> </para> <para role="spec">....</para>
<para role="test">-</para> <para role="precondition"> </para> <para role="postcondition"> </para> <para role='remark'></para> <o:test class='none'/> </simplesect>
for each para. the 3. above is the number I'm chasing. Grouping by integer section is doable by hand(15 sections or so) the detail is the hard part. Hence no, nesting isn't wanted at this stage. The majority of the text will be the testing, not the document content which I've truncated as shown.
<bk> <block sect="1"> <para>Copyright ) OASIS. 20022007. All Rights ....</para> <para>All capitalized terms in the following t ....</para> <para>This document and translations of it may ....</para> <para>The limited permissions granted above ar ....</para> <para>This document and the information contai ....</para> <para>OASIS requests that any OASIS Party or a ....</para> <para>OASIS invites any party to contact the O ....</para> <para>OASIS takes no position regarding the va ....</para> <para>The names "OASIS", OpenDocument, Open ....</para> </block>
I.e. the numbering is out by one since the document doesn't start with a header. I'm working on Andrews Solution to see if I can hack round it
Feature request for :number 'starts-at="0"
<xsl:template match="block"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:attribute name="sect"> <xsl:number count="group" start-at='42' level="multiple"/> </xsl:attribute> <xsl:apply-templates/> </xsl:copy> </xsl:template>
-- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk