Manual of Lua-URI: urn-issn

lua-uri-urn-issn - ISSN URN support for Lua URI library

Description

The class uri.urn.issn is used for URNs with the NID 'issn', that is, URIs which begin urn:issn:. It inherits from the uri.urn class.

The URI is considered invalid if it doesn't have 8 digits, if there is anything extra in the NSS other than the digits and optional single hyphen, or if the checksum digit is wrong.

As specified, the check digit is canonicalized to uppercase. The canonical form has a single hyphen in the middle of the digits.

Methods

All the methods defined in lua-uri(3) and lua-uri-urn(3) as supported, as well as the following:

uri:issn_digits(...)

Get or set the ISSN value as a string containing just the numbers. There will be no hyphens in this value, and it should be exactly 8 characters long.

If a new value is provided then it must not be nil, and will be validated in the normal way, causing an exception if it is invalid.

References

This implements the 'issn' NID defined in RFC 3044, and is consistent with the same NID suggested in RFC 2288.