SASDigitalHumanitiesTraining / TextEncoding

Text Encoding for Ancient and Modern Literature, Languages and History
9 stars 5 forks source link

<div>, xml:id, and diary entries #20

Closed samosafuz closed 2 years ago

samosafuz commented 3 years ago

My individual project is to encode portions of a personal diary. With indexing and publishing in mind, I wonder whether I'm doing things the right way as regards the entry headers.

An example is:

17 February 1920, Cairo, Shepheard's Hotel

On one level, I know what to do, using <div> and @type="entry", treating the whole as <head> while tagging the date, settlement, and location:

<div type="entry">
  <head>
    <date when="1920-02-17">17 February 1920</date>, 
      <placeName>
        <settlement ref="https://www.geonames.org/360630/cairo.html">Cairo</settlement>
      </placeName>      
      <placeName ref="https://www.wikidata.org/wiki/Q1296267">Shepheard’s Hotel</placeName>
  </head>
  <p>...</p>
</div>

But I'm also unhappy with this, at some level, principally since I haven't enumerated the entries in any way. As such, I wonder whether using @xml:id would facilitate things, e.g.,

<div type="entry" xml:id="19200217">

I'm a bit fuzzy on whether I need to declare/define every such @xml:id, and (if so), whether those declarations should include the @when, <placeName>/<settlement>, and @ref, as well (or whether that is ultimately redundant since the diary includes it, too).

A second question arose in yesterday's class, regarding entries for individual days that are broken up across different pages of the diary. I can see that the @xml:id will allow them to correspond, but I'm also fuzzy on how exactly to use @next and @prev to link them.

cmohge1 commented 3 years ago

Terrific work -- thanks for the interesting questions. We should discuss in more detail later today, but I think your instinct for encoding each entry within a <div> is right. In terms of numbering them, yes you could give each entry a unique @xml:id and/or you could use an @n to label them numerically. The value of giving @xml:ids is that you can create unique links to refer back to those entries.

gabrielbodard commented 3 years ago

The simple way to use @prev and @next would be something like this. Say the entries tagged in divs e92 and e105 are considered to be a single diary entry.

<div xml:id="e92" next="#e105">...</div>
<div xml:id="e93"> <!--etc.--> </div>
<div xml:id="e105" prev="#e92">...</div>

There are other ways to do this, but this is basically the mechanism for @prev/@next.