Skip to content
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

EPUB schema metadata/date/event and metadata/identifier/scheme attributes are not being parsed #53

Closed
vers-one opened this issue Sep 1, 2022 · 1 comment · Fixed by #54
Assignees
Labels

Comments

@vers-one
Copy link
Owner

vers-one commented Sep 1, 2022

Description

opf:event and opf:scheme attributes in the following example are always skipped during the parsing:

<package xmlns="http://www.idpf.org/2007/opf"
         xmlns:opf="http://www.idpf.org/2007/opf"
         xmlns:dc="http://purl.org/dc/elements/1.1/" ...>
  <metadata>
    <dc:date opf:event="...">...</dc:date>
    <dc:identifier ... opf:scheme="...">...</dc:identifier>
    ...

This is due to the fact that those attributes are not part of DC (Dublin Core Metadata Element Set) XML namespace. Instead, they are extra attributes added by the EPUB 2 standard which is why they appear in the opf XML namespace in the example above. EpubReader didn't account for this fact, so the values of those attributes were always null after parsing.

Sample EPUB file

test.epub

EPUB specification links

@vers-one
Copy link
Owner Author

vers-one commented Sep 1, 2022

Fixed in PR #54.

@vers-one vers-one closed this as completed Sep 1, 2022
@vers-one vers-one linked a pull request Sep 6, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant