nlbdev / nordic-epub3-dtbook-migrator

Tools for converting between a strict subset of DTBook and EPUB3.
http://nlbdev.github.io/nordic-epub3-dtbook-migrator/
GNU Lesser General Public License v2.1
8 stars 7 forks source link

dc:source content validation rule does not allow non-ISBN/ISSN dc:source data #497

Closed martinpub closed 3 years ago

martinpub commented 3 years ago

2020-1 guidelines:

If the source material does not have an ISBN, ISSN or any other systematic source identifier the content of the element will be a text string based on whatever available information about the source there is (publisher, year of publication etc.).

Current validation error:

[opf3h] the ISBN or ISSN in dc:source ("urn:isbn:") can only contain numbers and hyphens, in addition to the 'urn:isbn:' or 'urn:issn:' prefix. The last digit can also be a 'X' in some ISBNs.

I guess the more appropriate rule would be to allow any text except, when the string starts with "urn:isbn:" or "urn:issn:". In these cases, the rule presented above about numerical entries for ISBN/ISSN should apply.

kalaspuffar commented 3 years ago

Hi @martinpub

Do you have an example where this applies. At the moment it checks that the identifier doesn't start with isbn och issn and if so it should be allowed, but if they are used it needs to be a number and might end in an X.

In the above validator error, the value started with urn:isbn: which should be validated.

I might have missed some detail here but the rule seems to be written to your specification.

Best regards Daniel

martinpub commented 3 years ago

Hi @kalaspuffar, and thanks for checking. I tested now and I can verify that you're right, text seems to work. I think that what happened was there was an entry like <dc:source>urn:isbn:</dc:source>, which triggered the error. I should have investigated more closely before filing the issue. Will close this now.