-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate EPUB3 documents #5
base: master
Are you sure you want to change the base?
Conversation
@ccheraa To ensure I don't overlook any of the required changes that you described, could you please open a PR in hsg-shell (against master) with the necessary changes? |
@ccheraa Alternatively, it might be faster to upload the |
@joewiz here is the updated |
@ccheraa Thank you! When I installed the supplied frus-web.xql into <exception>
<path>/db/apps/release/ebook-batch.xq</path>
<message>err:XPST0003 error found while loading module epub: Error while loading module
modules/epub.xql: error found while loading module render: Error while loading module
tei-render.xql: error found while loading module frusx: Error while loading module frus.xql:
error found while loading module hsg-config: Error while loading module
/db/apps/hsg-shell/modules/config.xqm: error found while loading module pm-frus: Error while
loading module ../resources/odd/compiled/frus-web-module.xql: error found while loading
module m: Error while loading module /db/apps/hsg-shell/resources/odd/compiled/frus-web.xql:
Syntax error within user defined function model:apply: unexpected token: when [at line 117,
column 90]</message>
</exception> Looking at line 117:90 I saw a typeswitch expression for a TEI element that we don't support in frus.odd ( But when I tried generating an EPUB3 for a volume, no output file was saved to the destination folder. The request I issued was: http://localhost:8080/exist/apps/release/ebook-batch.xq?volumes=frus1969-76v18&format=epub3. I found this error in monex's console log:
Looking at Line 651 in e97bc38
(Looking at the return clause here, I notice some mixing of namespace prefixes: some elements have the Lastly, are some or all of the TEI Publisher PRs required for the custom frus-web.xql you supplied to be generated automatically when the ODD is processed? I think the full list of these PRs is as follows:
|
p.s. I just realized that the first error in my post above may have been caused by my being on the https://github.com/evolvedbinary/exist/commits/feature/tumbling-sliding-window branch of eXist (which exhibits a parser bug when referring to an attribute with the name |
After switching to eXist develop, the first error I had reported above ("unexpected token: when") went away. The remaining aspects of my response are all still valid though. |
29ead2c
to
aaaf88e
Compare
@joewiz It should work now 👍 |
I generated EPUB 2 (original) and EPUB 3 (this PR) versions of frus1969-76v18:
(Pardon the extra .zip, but without this GitHub wouldn't permit the upload.) After a brief side-by-side review of this volume, I noticed several issues with the resulting EPUB 3. Here, screenshots are taken with Apple Books, but I would guess the same issues are present in any ebook reader app:
I am guessing some of these might be issues introduced by the move to TEI Publisher rather than the specific addition of EPUB 3 footnote capabilities. But they are serious flaws/regressions, and in the current state we could not distribute these EPUB 3s - which is a shame, since the pop-up footnotes work so nicely. @racheltommasino Perhaps we should call this task complete and defer ironing out the unforeseen TEI Publisher EPUB 3 issues in a future task? |
@ccheraa One more thing. What is the plan for getting your custom modifications to frus-web.xql into hsg-shell (resources/odd/compiled/frus-web.xql)? That's a compiled file (from resources/odd/source/frus.odd), not a hand-edited one. |
This adds an option to generate EPUB3 documents using https://github.com/eeditiones/tei-publisher-app
These changes use
tei-publisher-lib
to generate epub documents, while the current epub generation method uses the deprecatedtei-simple
, since both packages use the same namespaces, which causes conflicts, we are now usingtwi-publisher-lib
only.But this package relies on
hsg-shell
which usestei-simple
so in order to test these changes you ned to make a few adjustments to the document/db/apps/hsg-shell/resources/odd/compiled/frus-web.xql
:First, change:
to:
Second, add these extra arguments to the following calls:
html:listItem
:()
html:list
:()
html:cit
:()
html:alternate
:@when
html:link
:(), map {}
i.e.
This open source contribution to the release project was commissioned by the Office of the Historian, U.S. Department of State, https://history.state.gov/.