-
Notifications
You must be signed in to change notification settings - Fork 32
Refactoring Publication models + XmlParser rewrite with namespaces handling #88
Conversation
…m values and rewrite mapping to ContentLayoutStyle for better conformance to epub spec
In a robust and conformant implementation, attributes and elements should not be identified just by their name or usual prefixes. Default namespace can differ from one XML file to another and can change along the way. Prefixes are completely arbitrary and authors are allowed to use anything that comes to their mind. Add some features along the way: -Make rendition properties match Readium Manifest specification -Add basic support for subtitle and epub fallback in Publications
… report issues when parsing a RWPM
@qnga There's one thing that you need to keep in mind for the EPUB parser: when extracting hrefs from XML, they need to be URL decoded (this is used in encryption.xml, or when creating Some checks used to be done directly in If you do it in the |
This PR now also contains this one from @qnga : #85
|
To keep track, we have decided to decode URLs in PublicationParser.normalize, always used to resolve relative paths. |
Remove EpubLayout.fromEpub
Use Long for file length instead of Int Remove Metadata.layout (now in Presentation.layout)
b4142a9
to
362fa97
Compare
946e6bf
to
06b39d8
Compare
…alizedString.getOrFallback and other minor fixes
links, metadata and readingOrder are mandatory when producing a RWPM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many points have been discussed and resolved privately.
I intend to merge this next Monday. |
I put |
Refactoring of the Publication models to align with Swift and add missing features/models.
Fixes readium/kotlin-toolkit#192, Fixes readium/kotlin-toolkit#193, Fixes #38, Fixes #35, Fixes #36, Fixes readium/architecture#113
publication
package.Publication
are still mutable because R2's implementation relies on it (e.g. adding theself
link).Publication
,Metadata
andProperties
.Properties
extensions.WarningLogger
interface to forward issues while building aPublication
to the test-app.Publication
. Having a way to observe internal warnings can be of interest for the test-app/debugging.Parcelable
instead ofSerializable
to sharePublication
throughIntent
.A few things are left to be refactored later:
Publication.TYPE
is mixing up a few things together, but the test-app is still relying a lot on it. I opened an issue for that: Model for the Publication's format/type architecture#112Publication.internalData
should be removed, but is used right now in the streamer to send the rootFile. I think that this information is already available in theContainer
though.MediaOverlays
models since it is not yet fully specified and a WIP (same thing on Swift).This issue still needs to be resolved before merging this refactoring: readium/webpub-manifest#42
This PR now also contains this one from @qnga : #85
Migration Guide for the Client Apps
See these changes that were done in the test app to guide you.
See the Migration Guide to upgrade our app.