LUA-URI-URN(3) | Lua uri.urn module | LUA-URI-URN(3) |
lua-uri-urn - URN support for Lua URI library
The class "uri.urn" is used for URNs, that is, URIs with the "urn" scheme. It inherits from the uri class.
Any URN containing an authority part or query part is considered to be invalid, as is one which does not have a valid NID. URNs must be of the form "urn:nid:nss", where the NSS part has a syntax specific to the NID. The scheme and NID part are both normalized to lowercase. Some NIDs have subclasses which enforce further syntax constraints, do NID-specific normalization, or provide additional methods.
All the methods defined in lua-uri(3) are supported. The "userinfo", "host", "port", and "query" methods will always return nil, and will throw an exception when passed anything other than nil. The "path" method will throw an exception if given a new path which is nil or not valid for the "urn" scheme.
The following additional methods are supported:
An exception will be thrown if the new NID is invalid, or if the existing NSS value is invalid in the context of the new NID. Note that the value 'urn' is an invalid NID.
This can cause the class of the URI object to change, if a different class is appropriate for the new NID.
This will throw an exception if the new value is invalid for the current NID.
The following subclasses are used for URNs with certain NIDs. URNs with other NIDs just use the generic "uri.urn" class.
This class is based on "RFC 2141".
2012-00-00 | 1.1 |