Index talk:Chronological Table and Index of the Statutes.djvu

Latest comment: 4 years ago by ShakespeareFan00 in topic How to build the index portion?

How to build the index portion? edit

What is desirable is a structure like this ( I appreciate this isn't quite true XML.)

<idx>
<idxentry><heading>Heading</heading>
<topic>A subject</topic>
<statute>Statute</statute>
<statute>Statute</statute>
...
<topic>A subject</topic>
<crossrefences><crossreference></crossreference>
<crossreference></crossreference>
<crossreference></crossreference>
....
{<crossrefences also=yes>
<crossreference><crossreference>
</crossreferences>}
</idxentry>
...
<idxentry><heading>Heading</heading>
...
</idxentry>
</idx>

Within IDX and IDXGROUP and CROSSREFERENCES tags all inter-tag whitespace should be ignored.

IDX contains one or more IDXENTRY

An IDXENTRY must contain a HEADING followed by either

  • One or more TOPIC followed by one more STATUTE. Optionally a CROSSREFERENCES section (with the also attribute set) may be the terminating tag in an IDXENTRY., or
  • CROSSREFENCES. (i.e. A 'See' entry for a heading)

All STATUTE tags within an IDX regardless of nesting should align vertically over a page, or have the same position within a line.

ISSUE: Under an initial HEADING, there may be sub-headings? ISSUE: Further sub TOPIC can be nested, do we need a closing tag for TOPIC to cope with this? ISSUE: What about TOPIC followed by a CROSSREFENCE? (Does this occur?)

Currently, I'd tried to do this using definition lists and found it was getting complicated to do it reliably, when sub-headings became involved.

What would be the most effective way to implement this as the various approaches I've tried so far seem to have resulted in things getting rather complicated? ShakespeareFan00 (talk) 08:16, 9 February 2020 (UTC)Reply

Further to the above edit

https://jsfiddle.net/saq9njo2/ This type of layout isn't going to be possible to do directly with Wikitext/mediawiki syntax. ShakespeareFan00 (talk) 09:47, 9 February 2020 (UTC)Reply