On this Page Filed elsewhere

Replacing BODY with GROUP

Source: email
Date: 15 Mar 2002
File name:
Keywords: BODY, GROUP, TEXT, structure

Query. GROUP with multiple TEXTs did seem appropriate, as they had own title pages. However, the first title page applies to the group of texts, not just the first text ...

Answer. PFS: Although in the instructions we have rather simplified things for the vendors (offering them only the choice between TEXT and GROUP as the top-level element), in fact the DTD allows more complicated arrangments. In particular, it allows one to substitute GROUP not only for the TEXT tag but also for the BODY tag. This is commonly useful when you have a number of TEXTs (each, say, with its own pagination and title page) bound together in a book with a title page and preface that refer to all the texts. In that case, you can organize the book like this:

<TEXT> -- top level element containing the whole book
    <FRONT> -- includes title page and preface that refer to whole book
    <GROUP> -- in place of the usual <BODY>, use <GROUP>.
        <TEXT> -- the first of the subordinate works within the book
            <FRONT> -- includes the title page of the subordinate work
            <BODY> -- the body of the subordinate work
        <TEXT> -- the second of the subordinate works within the book
            <FRONT> --includes the title page of the subordinate work
    <BACK> -- includes, say, an index to ALL the texts.

Back to Top

Wrong PB numbers

Source: email
Date: 07 Jun 2004
File name:
Keywords: PB, structure

Query. ... the vendors have got the PBs wrong - ref 16 should be ref 15, ref 17 should be ref 16, etc. Is there a way of globally replacing REF="n" with REF="n-1"?

Answer. A. If the sequence has no omissions, and is the usual EEBO sequence of 1, 1, 2, 2, 3, 3, 4, 4, etc., then you can simply replace all the REF values globally using TextPad. The only trick arises from the need to double every image number, because each image contains two pages. I manage this by first changing REF to something ending in an incrementing number, then change the REFs ending in an odd number and the REFs ending in an even number separately, creating two alternating sequences of incrementing numbers.

(Even if there is a break in the sequence or two, you can do the same thing to each 'chunk' of the sequence, so long as you are careful to restart the REF values at the correct number.)


Answer. B. Much faster, and the *only* way that I know of if the REF values need to be out of sequence, or repeat unpredictably, or are messy in any way, is to use Perl, as follows:

I just tried this on a couple of files and it works magically.


Back to Top