-
Notifications
You must be signed in to change notification settings - Fork 0
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
EPUB3/HTML support #9
Comments
Yes, it's quite likely that we will also use EPUB3 as input format in the long run. |
Other agencies have done this by making some or all XSLT and CSS files work with both DTBook and HTML (EPUB). It seems indeed like maintainability and readability benefits from that because DTBook is quite similar to HTML. (The alternative for making XSLT and CSS files work with both DTBook and HTML is to have separate stylesheets for DTBook and HTML, but because they have a lot in common they could import a common stylesheet.) See for example:
For us, it means the following files either have to be made to work with HTML or ported to HTML.
|
There are a number of SBS-specific extensions to DTBook for which we need to find an alternative in EPUB 3. I will create a table here with the mapping and we can discuss the problematic ones. [table moved to wiki page] |
@egli Can I get that pointer to the Nordic EPUB specification? |
|
@egli The progress can be seen on branch sbs-9. I'm waiting with merging it because I still can't run all the tests at once even after increasing the memory. |
If at some point we want to let Mischa try it, and I haven't found a real solution to the problem yet, we could merge it but with the new tests disabled. |
We do have an EPUB test document that was produced in India |
That looks pretty good. It is interesting how many standards there are for the different purposes. Compared to our current DTBook, EPUB3 will apparently involve a lot more namespaces and the terminology will be a varied mix. So whatever you decide for the elements brl:select, brl:running-line, brl:toc-line, brl:time is fine by me since it's not possible to find a uniform naming anyway. |
Coherentness is indeed something we need to carefully think about. You need to work with this every day so your opinion is important. At the same using standards is also important, and last but not least, compatibility with the Nordic guidelines. Changing the Nordic guidelines is possible but apparently a slow process. The Nordic guidelines have apparently chosen to use "class" for some semantics instead of a custom "epub:type" prefixed with "nordic:". I'm not sure what the motives were. However they do use epub:types that are available in either the default or the z3998 vocabulary. Moreover, they do have a "nordic:" prefix but they only use it for some of the metadata, not for epub:types. Nordic's use of class is not always appropriate in my opinion, but I think we have to live with this. It's also hard to avoid the mix of different attributes and prefixes because this is just how EPUB works, and because of the compatibility requirement with Nordic. What we could do to simplify things a bit is to not use our own "sbs:" prefix and use classes instead. This is semantically not optimal, but at least it creates some coherentness with the Nordic guidelines. In addition, we can try to completely eliminate "brl:" elements and attributes. |
I would not take the Nordic guidelines as the be-all-end-all truth. While they are useful and most likely will define the shape of the EPUB we will get from our providers I would also be forward looking and improve things where you think it makes sense. |
We could of course have a converter from "Nordic EPUB 3" to "SBS EPUB 3". But this makes interchanging files a bit difficult unless we have the conversion in the two directions. |
Doing the markup with Oxygen is very user-friendly. DTBooks can be validated against both our inhouse minimal schema and the classic DTD. The most important feature is that the editor displays a list with all the possible elements at any place in the document (auto completion). If Oxygen also behaves like that with EPUB3 files then I don't see any problems for the users. It will take some time to learn and memorize the new markup, that's obvious, but after a while everybody will get used to it. |
I talked to @mixa72 about this yesterday and the consensus seems to be that the actual names of the elements that we will use in the EPUB are not so important to the transcribers, as long as oXygen does the auto completion. |
Yes that's what Mischa said last time. But still we should think it through. What about the things where I have put question marks? |
By me it's ok if you use the following for EPUB3: brl:select --> brl:select (or solution with span) brl:running-line --> brl:running-line brl:time --> brl:time (if we keep brl:date; if we use sbs:date instead, I'd also prefer sbs:time) But I'm open to accept anything as long as there is no loss in functionality with respect to the actual system. |
Okay. |
An importance remark that was made in our call today is that what we use as authoring format does not need to be standards compliant, as long as what we distribute or exchange with Nordic countries is standards compliant. So it is no problem if the authoring format has really SBS-specific things such as |
Test suite works again (#52 (comment)). |
All the existing unit tests pass now. I'm going to merge the sbs-9 branch even though some things might not work yet, and even though the exact EPUB 3 format (see wiki page) hasn't been decided yet. We can move the issue back to "Backlog" if Mischa finds issues, or if we want to make changes to the EPUB 3 format. |
I found some issues in the EPUB3 output. I first created a file as DTB and an identical one as EPUB. Here are the differences I found. Possibly my markup is wrong, please take a look at it.
|
OK thanks for the heads up! |
@mixa72 What is supposed to happen with @namespace brl url(http://www.daisy.org/z3986/2009/braille/);
brl|class~='myclass' {
...
} |
OK I see what you are trying to do. You put this in the EPUB: <style>
@namespace xml "http://www.w3.org/XML/1998/namespace";
@namespace brl url(http://www.daisy.org/z3986/2009/braille/);
li[brl|class='myclass'] {
margin-left:2;
}
</style> The problem is that this CSS is not enabled unless you specify the "apply-document-specific-stylesheets" option (why is currently not available in the SBS version of the script). |
@bertfrees Thanks for the hint with the syntax. However, it appears that any css instruction in the style Element is ignored by the system. I even tried
but nothing changes. Is that possible? |
Well, there are two problems. Firstly, like I said above you need the "apply-document-specific-stylesheets". (I will add it.) Secondly, you need to add |
I seem to understand it now: as "apply-document-specific-stylesheets" is disabled now, I'll have to test the brl:class attribute via external stylesheet (scss), right? |
Indeed. |
However I think there is another issue, which might also explain why the elements like brl:v-form, brl:num etc. don't work. I'm investigating it now. |
Never mind, forget that last comment. |
OK so I've added the "apply-document-specific-stylesheets" option and that solves the All the other issues are because brl:* elements are not valid in HTML and as a result the prefixes are removed in the load step. (brl:* attributes are also invalid but here the prefixes are retained). A solution is to make the translator and the style sheets work regardless of whether the "brl:" prefix is present. But better is of course to create valid HTML, for example by using epub:type or class attributes. Another issue I found in your EPUB is that it uses .list-style-type-none {
list-style-type: none;
} |
OK. I'll adjust my EPUB accordingly. Thanks! |
BTW is the apply-document-specific-stylesheets option also visible in the GUI or just available in the background? |
Yes it will be visible in the GUI. |
Done. I had to make some small adjustments to the EPUB in order to make it behave exactly as the DTBook: see chapter.xhtml. |
EPUB3 to PEF Conversion works now. All the above mentioned inline elements are translated as in the DTB to PEF Conversion. CSS Support for stylesheets inside EPUB3 also works. Thanks. The embedded braille rendition from the EPUB3 to EPUB3 conversion differs a bit from the output in the PEF in that some inline elements are not translated accordingly: |
Yes, I haven't applied the fix to the epub3-to-epub3 script yet. We'll track that in issue #58. |
OK. Then I'll close this issue now. |
If SBS also intends to use EPUB3 as input format, pipeline-mod-sbs should also have an epub3-to-pef script and corresponding HTML translator.
The text was updated successfully, but these errors were encountered: