TEIC / TEI

The Text Encoding Initiative Guidelines
https://www.tei-c.org
Other
271 stars 88 forks source link

A question regarding "processing instruction" in the guideline (Ch4) #2220

Closed nakagawanatuko closed 1 year ago

nakagawanatuko commented 2 years ago

We are translating the TEI guideline (Ch4) into Japanese and got a question in 4.4. Virtual division. The guideline says the following:

Where the whole of a division can be automatically generated, for example because it is derived from another part of this or another document, an encoder may prefer not to represent it explicitly but instead simply mark its location by means of a processing instruction, or by using the special purpose divGen element.

What is "a processing instruction" for example? Is the divGen tag kind of processing instruction, or does it mean totally different instruction? Processing instructions in XML in general appear only at the beginning of the document and are not expected to appear in the middle.

hcayless commented 2 years ago

A processing instruction is just a message to a program that processes an XML file. They are commonly used to link schemas to documents (and therefore appear at the top of the document), but they can occur anywhere. You can see some examples in https://github.com/TEIC/TEI/blob/daab99ca7a2ea83c2d2f4ee8f1f8e874b288492c/P5/Source/Guidelines/en/REF-ELEMENTS.xml#L18-L19, which get replaced, when the file is processed as part of generating the published Guidelines, with bits of information like the total element count, etc. See https://tei-c.org/release/doc/tei-p5-doc/en/html/REF-ELEMENTS.html for the final result.

So you could imagine something like this producing an automatically generated <div>. <divGen> is an element which could be used in the same way, for example inserting an index of names compiled from <persName> elements in the document. I think the way this is worded is could be clearer, and certainly the reasons for preferring a processing instruction or <divGen> could be explained better.

<divGen> is a bit strange to me. It's presumably meant to be replaced by a <div> with the generated content when it's processed, but I think it would be more natural if it had the same content model as <div>, and remained a <divGen> with the new content. I don't know why it's the way it is.

raffazizzi commented 2 years ago

@nakagawanatuko Does @hcayless's response answer your question? Can we consider this issue resolved?

nakagawanatuko commented 2 years ago

yes, please! Thank you!

On Reiwa 4 Feb 25, Fri at 0:30 Raffaele Viglianti @.***> wrote:

@nakagawanatuko https://github.com/nakagawanatuko Does @hcayless https://github.com/hcayless's response answer your question? Can we consider this issue resolved?

— Reply to this email directly, view it on GitHub https://github.com/TEIC/TEI/issues/2220#issuecomment-1049977531, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXR2O5QJEN4M4DGCPOSB3DU4ZFJTANCNFSM5MW5RXGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Natsuko Nakagawa 国立国語研究所 特任助教 Project Assistant Professor National Institute for Japanese Language and Linguistics https://sites.google.com/site/nakagawanatuko/