zach-m / jonix

Commercial-grade library for extracting data from ONIX sources
Apache License 2.0
57 stars 17 forks source link

Use save integer conversion for edition number #33

Closed Febell closed 11 months ago

Febell commented 11 months ago

The catalog of Libri (a big book fulfillment company in germany) contains elements with somthing like "XXXX."(i.E. "1404.") as edition number. Since there can always be some invalid numbers in the data you could use the safe conversion method for this value.

zach-m commented 11 months ago

This fix will work for onix2 sources (where EditionNumber is defined as a NonEmptyString). However, onix3 is clear about this field being a StrictPositiveInteger