This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook] numbered para element for program language statutes/clauses or legalese?


You could achieve this by assigning a role attribute to those special
paragraphs, such as role="statute" or whatever it is you are counting.

The stylesheet customization would add a template that matches on para with
that role.  The number could be generated using xsl:number, and with the
right attributes it will number continuously through a document, chapter, or
whatever.  Something like this:

<xsl:template match="para[@role = 'statute']">
  <fo:block xsl:use-attribute-sets="normal.para.spacing">
    <xsl:call-template name="anchor"/>
    <xsl:number count="para[@role = 'statute']" level="any"/>
    <xsl:text>. </xsl:text>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Doug du Boulay" <ddb@owari.msl.titech.ac.jp>
To: <docbook@lists.oasis-open.org>
Sent: Monday, January 17, 2005 1:23 AM
Subject: [docbook] numbered para element for program language
statutes/clauses or legalese?


>
> I was wondering what the (DocBook and XSL) options are for having
> sequentially numbered/labelled paragraphs such as legal statutes or
> clauses where the labelling remains sequential, continuous across multiple
> section?
>
> Basically I am looking to emulate something like:
>     http://www.iucr.org/iucr-top/cif/spec/version1.1/cifsemantics.html
> (hmmm. seems to be off air at the moment)
>
> where most paragraphs are numbered, but for instance, the second etc. para
> elements of a certain point aren't. None of the numbered paragraphs have
> titles.
>
> Presumably each numbered para should have an explicitly defined unique
> (non-numeric?) ID for cross-referencing between relevant clauses.
>
> Have other folk needed anything like this, and if so, what did you do?
> Is there a common @role attribute id customization anywhere?
>
> Thanks
> Doug
>
>
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]