Wikisource:WikiProject DNB/Transclusion

Wikisource:WikiProject DNB Transclusion

If you look at the wikitext in an article you will not find the actual text of the DNB article. Instead, you will find syntax that directs the server to include the appropriate text from page space. This process is called Transclusion. To add a new article, an editor must first correct the text in page space, and then create the article itself in article space using the correct syntax to "transclude" the article text. The project supplies templates to simplify this process.

Note: in the early phases of the project, articles in article space did contain the text, because the scans were not yet available in page space. As of 2011, all of these should have been replaced.

Why transclusion?Edit

We believe that our readers will in general want to read articles in article space. The goal of the project is to create these articles. However, the best way to create a word-perfect copy of the original is to perform side-by-side comparisons with the "pictures" of the pages, and this is easily done using the tools and displays provided in page space. By using transclusion, any edit in page space to correct transcription error will immediately be reflected in the article in article space. In addition, anyone reading the article in article space can bring up the page-space version to verify that the transcription is correct.

Markup in page spaceEdit

An article in the original DNB may be completely included on a single page, or it may start on one page and end on the next page, or it may start on a page and continue on one or more complete pages before ending on a final page. From the perspective of page space, each page may contain "sections" of one or more articles.

To perform transclusion, we must identify the article sections on each page. Each section on a page is assigned a tag that is unique on that page. The DNB project has elected to use the DNB article name without the "(DNB00)" suffix as the tag. Thus the tag for all sections of the Abbadie, Jacques (DNB00) article is "Abbadie, Jacques". These tags are inserted in each page immediately before the text in the section. The first tag on each page is at the top of the page. The section starts immediately after the tag and continues until immediatly before the next tag. The last section on a page ends at the end of the page.

The DNB project uses a server-side code to implement a simplified tag syntax. To add a tag, start at the beginning of a line. Place two hash-marks, a space, the tag, a space, and two hash-marks on a line. Thus:

## Abbadie, Jacques ##

on a single line will tag the section.

Article-space templatesEdit

After you proof and tag the text in page space, you can create articles in article space using transclusion. An article consists of front matter and text. The front matter is implemented using the {{DNB00}} template, and the text is transcluded using the "pages index" construct.

The most efficient way to create a new page is to use {{DNBset}}. Used properly, this generates both the DNB00 and the"pages index" construct. Alternatively, you can simply copy the entire wikitext from an existing article and modify all the fields of the DNB00 template and the "pages index:" construct.

{{DNBset}} should be used as {{subst:DNBset}} copy the form to fill in from the Template page and paste it into the page you want to create, complete and save. This is certainly the best way to create long articles, since it takes the initial and final page numbers and adds everything in between. In this template the volume numbers must be two digits, so enter volume 7 as 07. The section name goes in the "section" field, assuming it is the same at the beginning and end. As rendered, this template becomes the {{DNB00}} standard template on top of the required transclusion message.

Transclusion artefactsEdit

Transclusion handles simple page breaks with no intervention when the page ends at the end of the word or sentence. When the page ends at the end of a paragraph, the editor must ensure that the next page has an empty line after the tag and before the start of the next paragraph. There are some cases where more elaborate measures must be taken.

Hyphenated word at end of pageEdit

If the final word of the page is hyphenated, as DNB style allows, there will be a space after the hyphen before the second half of the word. In this case, we use the {{hws}} template (hyphenated word start) at the end of the page and the {{hwe}} template at the start of the next page.

Small ("authorities") text across a page boundaryEdit

If the page break is in the middle of the "authorities" section in small type the means to handle it is rather than to wrap the text in {{smaller block}}, to utilise the separate set {{smaller block/s}} at the start of the authority text and {{smaller block/e}} in the footer. At the start of the next page, we then use {{smaller block/s}} in the header and {{tl|smaller block/e}} at the end of the authority. before the contributor's initals.

With this construct, the "page text" is a faithful reproduction of the text to place on the page and is sourced completely from the page it is displayed on the transcription of the page in page space. The "article text" is a copy of the text on the page, plus text from the following page. This text is not displayed on the transcription in page space, but it is displayed in the article.

(example at Page:Dictionary of National Biography volume 34.djvu/374 to Page:Dictionary of National Biography volume 34.djvu/375.

Other page-crossing constructsEdit

On occasion, you may encounter other problems at the page boundary, such as phrases in italics or phrases in small caps. if these cannot be broken into two constructs, then use the same technique that we use for small text (above.)