From 8e53cdc8ada273a414dc8f7b63305f12b01ea1ca Mon Sep 17 00:00:00 2001 From: Carsten Milling Date: Sun, 5 Jul 2026 14:38:28 +0200 Subject: [PATCH] Use for character Wikidata IDs Closes #130. Aligns character Wikidata ID encoding with the pattern already used for authors and plays: a bare QID in an child element instead of a full URI in @ana. Changes: - Update encoding guidelines for "Characters as Realisations of Concepts" - Fill in the character_wikidata_id (Ch5) feature description - Add deprecation warnings (role="warning") for @ana on person/personGrp inside particDesc, pointing to the updated guidelines section - Add Ch5 API feature-check constraintSpec - Add migration stylesheet 007-ana-to-idno.xsl - Add tests tst000024 (valid new encoding) and tst000025 (deprecated @ana) --- dracor.odd | 87 ++++++++++++++++-- migrations/007-ana-to-idno.xsl | 48 ++++++++++ ...st000024-feature-character-wikidata-id.xml | 88 +++++++++++++++++++ tests/tst000025-deprecate-ana-wikidata.xml | 87 ++++++++++++++++++ 4 files changed, 305 insertions(+), 5 deletions(-) create mode 100644 migrations/007-ana-to-idno.xsl create mode 100644 tests/tst000024-feature-character-wikidata-id.xml create mode 100644 tests/tst000025-deprecate-ana-wikidata.xml diff --git a/dracor.odd b/dracor.odd index 67dd6f1..e2152b8 100644 --- a/dracor.odd +++ b/dracor.odd @@ -1418,22 +1418,32 @@ Characters as Realisations of Concepts

If a character in a play is an actualisation of a character - archetype, e.g. a mythological figure or a historical person, it is - possible to provide a link to the entity on Wikidata by - including the full URI in the attribute ana. + archetype, e.g. a mythological figure or a historical person, + it is possible to provide a link to the entity on Wikidata. + The Wikidata QID is encoded as an idno element with + type wikidata inside the person + or personGrp element.

- + Medea + Q174278 - + Napoleon + Q517

+

+ The use of the ana attribute with a full Wikidata + URI (e.g. http://www.wikidata.org/entity/Q174278) + is deprecated. Use the migration stylesheet + 007-ana-to-idno.xsl to update existing files. +

@@ -3097,6 +3107,13 @@

Feature Ch5 character_wikidata_id: + Wikidata QID of the real-world entity (e.g. a mythological + figure or historical person) that a character represents. + Encoded as idno with type + wikidata inside the person or + personGrp element (see + Characters + as Realisations of Concepts).

@@ -5833,6 +5850,26 @@ + + + Deprecation: use idno with type + wikidata instead of ana for Wikidata + links on person. + + + + + Using @ana for Wikidata links on <person> is + deprecated. Use <idno type="wikidata">Q…</idno> + instead. Apply migration 007-ana-to-idno.xsl to update. + + + + @@ -5888,6 +5925,26 @@ + + + Deprecation: use idno with type + wikidata instead of ana for Wikidata + links on personGrp. + + + + + Using @ana for Wikidata links on <personGrp> is + deprecated. Use <idno type="wikidata">Q…</idno> + instead. Apply migration 007-ana-to-idno.xsl to update. + + + + @@ -6872,6 +6929,26 @@ + + + + + + Feature-Check: + + Ch5 character_wikidata_id + + + + + + Supported API feature: character_wikidata_id + + + +
diff --git a/migrations/007-ana-to-idno.xsl b/migrations/007-ana-to-idno.xsl new file mode 100644 index 0000000..b46721e --- /dev/null +++ b/migrations/007-ana-to-idno.xsl @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tst000024-feature-character-wikidata-id.xml b/tests/tst000024-feature-character-wikidata-id.xml new file mode 100644 index 0000000..94fbaa7 --- /dev/null +++ b/tests/tst000024-feature-character-wikidata-id.xml @@ -0,0 +1,88 @@ + + + + + + + Ham + A Tragedy + William S + + + DraCor + https://dracor.org + + CC0 1.0 + + + + + + dracor-schema GitHub Repository + + + CC BY 4.0 + + + + Slides of the Hebrew and Yiddish DraCor Working group meeting on + 2022-11-14 by Daniil Skorinkin + + + + + + + + + + + + + + + + Ham + + + Medea + Q174278 + + + + + + Describe Change! + + + + +
+ Ham, a tragedy By William S +
+
+ +
+ Act 1. +
+ Scene 1. + Ham and Medea. + + Ham. +

Lovely Spam!

+
+ + Medea. +

Wonderful Spam!

+
+
+
+ +
+
diff --git a/tests/tst000025-deprecate-ana-wikidata.xml b/tests/tst000025-deprecate-ana-wikidata.xml new file mode 100644 index 0000000..5e2afc2 --- /dev/null +++ b/tests/tst000025-deprecate-ana-wikidata.xml @@ -0,0 +1,87 @@ + + + + + + + Ham + A Tragedy + William S + + + DraCor + https://dracor.org + + CC0 1.0 + + + + + + dracor-schema GitHub Repository + + + CC BY 4.0 + + + + Slides of the Hebrew and Yiddish DraCor Working group meeting on + 2022-11-14 by Daniil Skorinkin + + + + + + + + + + + + + + + + Ham + + + Medea + + + + + + Describe Change! + + + + +
+ Ham, a tragedy By William S +
+
+ +
+ Act 1. +
+ Scene 1. + Ham and Medea. + + Ham. +

Lovely Spam!

+
+ + Medea. +

Wonderful Spam!

+
+
+
+ +
+