1RDF::NS::Curated(3)   User Contributed Perl Documentation  RDF::NS::Curated(3)
2
3
4

NAME

6       RDF::NS::Curated - A curated set of RDF prefixes
7

SYNOPSIS

9         my $ns = RDF::NS::Curated->new;
10         print $ns->uri('foaf'); # prints http://xmlns.com/foaf/0.1/
11         print $ns->prefix('http://schema.org/'); # prints schema
12

DESCRIPTION

14       This contains a list of 62 prefix and URI pairs that are commonly used
15       in RDF. The intention is that prefixes in this list can be safely used
16       in code that has a long lifetime. The list has been derived mostly from
17       W3C standards documents, but also some popularity lists. See the source
18       code of this package for the full list.
19
20       It is intended to be used with e.g. URI::NamespaceMap.
21
22   Methods
23       "new"
24           Constructor. Takes no arguments.
25
26       "uri($prefix)"
27           This will return the URI (as a plain string) of the supplied prefix
28           or "undef" if it is not registered.
29
30       "prefix($uri)"
31           This will return the prefix corresponding to the supplied URI
32           string or "undef" if it is not registered.
33
34       "qname($uri)"
35           This will return the qualified name corresponding to the supplied
36           URI string or "undef" if it is not registered. In scalar context,
37           it will return the prefix and local name with a colon, and list
38           context, a two-element array containing prefix and local name.
39
40           For example "http://purl.org/dc/terms/name" will return "dc:name"
41           in scalar context and "('dc', 'name')" in list context.
42
43       "all"
44           This will return a hashref with all prefix and URI pairs.
45

BUGS

47       Please report any bugs to
48       <https://github.com/kjetilk/p5-rdf-ns-curated/issues>.
49

SEE ALSO

51       RDF::NS, XML::CommonNS, RDF::Prefixes.
52

AUTHOR

54       Kjetil Kjernsmo <kjetilk@cpan.org>.
55

CONTRIBUTORS

57       Harald Jörg
58
60       This software is copyright (c) 2015, 2017, 2018 by Kjetil Kjernsmo.
61
62       This is free software; you can redistribute it and/or modify it under
63       the same terms as the Perl 5 programming language system itself.
64

DISCLAIMER OF WARRANTIES

66       THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
67       WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
68       MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
69
70
71
72perl v5.32.1                      2021-01-27               RDF::NS::Curated(3)
Impressum