This relates to the idea we’ve had for a while for supporting multiple translations in the same language, for example Bodhi and Sujato.
What I want to do is come up with a folder and URL structure which elegantly handles this.
The first thing is I think what we currently have as the collection/division/sutta structure should be labelled the “navigation” or “menu” structure because it’s not precisely canonical. It’s simply the structure we use to build our menus.
Next is the concept of a “manuscript”, “book” or “publication” which may be online (technically we can even have an online edition of a manuscript), I would like to use the word “edition” to refer to any such thing at least for organizational purposes, altough perhaps “source” or “origin” would be terms which could also work. Approximately speaking an edition would be a collection of texts with a common creator (whether individual or organization) and copyright, also and more importantly a text would be unique within an edition.
Edition:
- An edition is a collection of texts with a common creator, individual or organization
- An edition has a label and a uid.
- A text is unique within an edition.
- Editions are at a higher organizational level than languages.
- An edition should (but not must) have a common copyright applicable to all texts within.
- An edition may have translations from multiple languages and/or into multiple languages but this would be unusual. Example: The same translator doing both Pali and Sanskrit translations.
I’d thought about having something like:
dn1-sujato.html
dn1-bodhi.html
But in the end from an organizational perspective, I think it’s best that all texts from a common creator should be in the same folder structure. Furthermore, I think that folder should be at the very highest level which would mean the file path might look like this:
/text/sujato/en/pi/su/dn/dn1.html
For ease of transition there would be a graball folder:
/text/common/...
While ideally you would place a group of translations from a particular origin into it’s own folder, you can also just dump them into common
, at least to the extent there are no collisions with existing translations.
I’m not decided on whether it’s better to have text/sujato/en/pi
or text/en/sujato/pi
, the relevant thing is both the translation language and the translator actually exist outside the primary navigation structure. It will in any case be fairly rare that the same translator translates to multiple languages so maybe it better belongs under the translation language.
Now as for why I think each edition should have be it’s own folder rather than mixing up texts from different editions. I feel it is superior from an organizational perspective, in a sense the texts from a same origin belong together more than texts in the same language, this is especially true when the origin is a book, the book object should be a container (i.e. folder) which contains all the texts from it. Also there is the DRY principle, if you use mn1-bodhi.html, mn2-bodhi.html… and so on you’re repeating yourself an awful lot. Also there is the language/division/subdivision/vagga type structure, the edition just doesn’t belong anywhere in that navigation structure, it belongs outside it (either to the right or the left). And finally just practically it is convenient for search/replace over multiple files as often there will be a problem particular to a set of texts from a common source (say for example misuse of a class).
The other thing is the URL, which can be quite independent of the folder structure. It’s actually not important right now because I’m mainly interested in making sure the data structure is forward compatible, but I’m thinking something like en/sujato/dn1
or en/dn1/sujato