NAME

RDF::SN - Short names for URIs with prefixes from prefix.cc

VERSION

version 20140909

SYNOPSIS

use RDF::SN;
$abbrev = RDF::SN->new('20140908');
$abbrev->qname('http://www.w3.org/2000/01/rdf-schema#type'); # rdfs:type

DESCRIPTION

This module supports abbreviating URIs as short names (aka qualified names), so its the counterpart of RDF::NS.

new( [ $ns ] )

Create a lookup hash from a mapping hash of namespace URIs to prefixes (RDF::NS). If multiple prefixes exist, the shortest is used. If multiple prefixes with same length exist, the first in alphabetical order is used.

qname( $uri [, $separator_char ] )

Returns a prefix and local name if the URI can be abbreviated with given namespaces. The default separator char is a colon (:).

AUTHOR

Jakob Voß

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Jakob Voß.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.