pfstrack / eldamo

An Elvish Data Model in XML
MIT License
53 stars 8 forks source link

Question on page-id in the data model #40

Closed Omikhleia closed 3 years ago

Omikhleia commented 3 years ago

Greetings,

This is a mere question. The XSD for the data model states:

The @page-id is the numeric identifier of the generated HTML Lexicon, and can be used to link to the lexicon.

How is generated this id in the first place and does it stays unchanged across revisions of the lexcon (that is, unless of course an entry is removed for some reason) ?

Let me clarify the question behind the question. I am looking for some sort of unique identifier to unambiguously link a word entry from other documents (web site, or even from another XML lexicon :) (note) ). From current usage (and as other sites did, e.g. Parf Edhellen), it seems the page-id is the way to go. I am nevertheless asking, to be sure it is indeed unique in some way and persistent across revisions of the Eldamo lexicon.

(note) E.g. the new (now online) HSD has a fuzzy search for matching entries on Eldamo and linking to them - but of course, homographs fail short. Thought I could use the same ids as you to mark an entry as "vetted" in some way (which would also help for cross-checks)

pfstrack commented 3 years ago

Yes, the page-id remains the same when I release new version of Eldamo.

It is generated using a hashing algorithm from the word itself with some adjustments to guarantee uniqueness, but once generated the page-id is saved as part of the model, so that if I modify the spelling of a word (e.g. to correct errors) the page-id won't change.

pfstrack commented 3 years ago

Oh, and by the way, I'm very happy to see HSD updating again.

Omikhleia commented 3 years ago

Clear and neat. Thanks (both for the confirm and the kind words) !