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

Doesn’t pick up on invalid empty identifier/source #1117

Open
jenstroeger opened this issue Mar 17, 2020 · 2 comments
Open

Doesn’t pick up on invalid empty identifier/source #1117

jenstroeger opened this issue Mar 17, 2020 · 2 comments
Labels
priority: low To be processed when time allows spec: all Impacting the support of all EPUB specifications status: ready for implem The issue is ready to be implemented type: improvement The issue suggests an improvement of an existing feature

Comments

@jenstroeger
Copy link

jenstroeger commented Mar 17, 2020

It would be helpful if EpubCheck would info/warn that identifiers are empty (or don’t match a pattern). For example,

<dc:identifier id="id-e985e6af">urn:isbn:</dc:identifier>
<meta refines="#id-e985e6af" property="identifier-type" scheme="onix:codelist5">15</meta>
<dc:source id="source-e985e6af">urn:isbn:</dc:source>
<meta refines="#source-e985e6af" property="source-of">pagination</meta>

isn’t being flagged at all. Same goes for UUIDs instead of ISBNs. I guess it would be ok with the elements contained no text whatsoever (in which case maybe <meta> could be flagged), but a n existing urn:isbn: expresses an intent to use an identifier, but there’s none…

Also, would it make sense to flag numbers with dashes instead of hyphens? Not sure it matters, but an ISBN like 123–0-1234567–0-0 seems odd to me, but is accepted.

@rdeltour
Copy link
Member

It isn't a spec violation, since EPUB basically allows any string as an identifier, but yes I can see how it can be useful.

There is a precedent of implementing UUID validation in #853 (so I'm surprised you say the same goes for UUIDs?).

It's low priority, but PRs are always welcome if anyone wants to fast-track an implementation 😊

@rdeltour rdeltour added priority: low To be processed when time allows spec: all Impacting the support of all EPUB specifications status: needs review Needs to be reviewed by a team member before further processing status: ready for implem The issue is ready to be implemented type: improvement The issue suggests an improvement of an existing feature and removed status: needs review Needs to be reviewed by a team member before further processing labels Mar 17, 2020
@jenstroeger
Copy link
Author

Thanks, @rdeltour!

It's low priority, but PRs are always welcome if anyone wants to fast-track an implementation 😊

If you can point me at the vicinity of where the responsible code lives, I’d take a stab at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low To be processed when time allows spec: all Impacting the support of all EPUB specifications status: ready for implem The issue is ready to be implemented type: improvement The issue suggests an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants