[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Grouping problem. 2.0

Subject: Re: Grouping problem. 2.0
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Fri, 04 Jul 2008 19:05:02 +0100
Re:  Grouping problem. 2.0
David Carlisle wrote:
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.

Andrews solution is good, but outputs

<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>


To back the start point up to where I want :-)




regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.