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

Make px:epub3-create-package-doc generate a predicable unique-identifier #612

Open
kalaspuffar opened this issue Jun 29, 2021 · 3 comments

Comments

@kalaspuffar
Copy link
Contributor

Currently, we have a failing generation of EPUBs when we validate them against the nordic guidelines. The failure is based on the fact that unique-identifier should be equal to the pub-identifier value.

Expected Behavior

pub-identifier and unique-identifier need to be present and equal in EPUB to follow nordic guidelines.

Actual Behavior

A pub-identifier is created with a value not equal to the unique-identifier.

Steps to Reproduce

Provide a list of steps taken to reproduce the problem.

  1. Checkout the nordic-epub-migrator repository
  2. Change the pom file to use 1.14.2 modules-parent dependency
  3. Run test cases

Environment

  • Linux Gentoo
  • DAISY Pipeline 2 version: 1.14.2
  • Interface: Test of nordic-epub-migrator

Logs

[opf2] on the package element; the unique-identifier-attribute must be present and equal ‘pub-identifier’.

@bertfrees
Copy link
Member

Thanks @kalaspuffar.

Just to be clear: the Nordic guidelines require that unique-identifier has a value of "pub-identifier". This is just some random value, there is no such thing as "a pub-identifier" in EPUB.

What px:epub3-create-package-doc could do is make the unique-identifier attribute more predictable.

For instance, currently when dc:identifier elements are present in the "metadata" input, the first one becomes the unique identifier. We could change px:epub3-create-package-doc so that the id attribute of this dc:identifier element (and therefore the value of the unique-identifier attribute) is preserved if present.

Another solution could be to add an option to set the value of the unique-identifier attribute (and therefore of the id attribute of the corresponding dc:identifier, either generated or coming from the metadata input). But I like this solution less.

@martinpub
Copy link

martinpub commented Jun 29, 2021

Hi, just wanted to verify @kalaspuffar and @bertfrees, is this affecting all epub3-to-epub3 uses, e.g. including metadata injection?

@bertfrees
Copy link
Member

Possibly yes.

@martinpub Also consider relaxing this restriction. Personally I think it makes no sence to enforce an IDREF attribute. Do you know what was the purpose of this requirement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants