My first dictionary "book" using SILE as an XML processor for a TEI subset #1252
Omikhleia
started this conversation in
Show and tell
Replies: 1 comment
-
i haven't taken the time to look at the XML processing, but the result looks nice! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been the main editor of an XML-based dictionary about one of Tolkien's invented languages for some years. The source XML dictionary is encoded in a specialized subset of the TEI P4 tagset. I fancied making a PDF out of it, using SILE. Would be fun, I said to myself, if SILE could help me where my previous attempts with XSLT, XSL-FO and FOP failed short (too many layers + too weird language = too many headaches)
So these past days, I wrote:
The pain point is that such a dictionary is a heavily "semantic" structured mark-up (i.e. a "lexical view", encoding structure information such as part-of-speech etc. without much concern for its exact textual representation in print form), much more than a "presentational" mark-up. Some XML nodes may contain many things we need to ignore (such as spaces, mostly) or supplement
(such as punctuation, parentheses, numbering - and again, proper spaces where needed). Without XPath to check siblings, ascendants or descendants, it may become somewhat hard to get a nice automated output (and even with XPath, it's quite messy anyway). I am not fully satisfied with the current solution (and some ad hoc tricks that might not be easy to generalize to any XML TEI dictionary...), so I'll need to step back and re-think it eventually.
But heh, to make a long story short, I am glad to share my current result, not perfect, but decently-looking (IMHO).
And the supporting class and packages are in my other repository
Beta Was this translation helpful? Give feedback.
All reactions