/usr/share/perl5/RDF/RDFa/Parser/InitialContext.pm is in librdf-rdfa-parser-perl 1.097-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | package RDF::RDFa::Parser::InitialContext;
use 5.010;
use strict;
no warnings;
BEGIN {
$RDF::RDFa::Parser::InitialContext::AUTHORITY = 'cpan:TOBYINK';
$RDF::RDFa::Parser::InitialContext::VERSION = '1.097';
}
my @rdfa_10 = qw(
alternate appendix bookmark cite chapter contents copyright
first glossary help icon index last license meta next p3pv1 prev
role section stylesheet subsection start top up
);
my @std_roles = qw(
banner complementary contentinfo definition main
navigation note search
);
my @aria_roles = qw(
alert alertdialog application article button checkbox
columnheader combobox dialog directory document grid
gridcell group heading img link list listbox listitem
log marquee math menu menubar menuitem menuitemcheckbox
menuitemradio option presentation progressbar radio
radiogroup region row rowheader separator slider
spinbutton status tab tablist tabpanel textbox timer
toolbar tooltip tree treegrid treeitem
);
our %Known = (
'tag:buzzword.org.uk,2010:rdfa:profile:rdfa-1.0' => {
map {;
"$_\@rel" => "http://www.w3.org/1999/xhtml/vocab#$_",
"$_\@rev" => "http://www.w3.org/1999/xhtml/vocab#$_",
}
@rdfa_10
},
'http://www.w3.org/2011/rdfa-context/rdfa-1.1' => {
qw(
grddl: http://www.w3.org/2003/g/data-view#
ma: http://www.w3.org/ns/ma-ont#
owl: http://www.w3.org/2002/07/owl#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfa: http://www.w3.org/ns/rdfa#
rdfs: http://www.w3.org/2000/01/rdf-schema#
rif: http://www.w3.org/2007/rif#
skos: http://www.w3.org/2004/02/skos/core#
skosxl: http://www.w3.org/2008/05/skos-xl#
wdr: http://www.w3.org/2007/05/powder#
void: http://rdfs.org/ns/void#
wdrs: http://www.w3.org/2007/05/powder-s#
xhv: http://www.w3.org/1999/xhtml/vocab#
xml: http://www.w3.org/XML/1998/namespace
xsd: http://www.w3.org/2001/XMLSchema#
),
qw(
cc: http://creativecommons.org/ns#
ctag: http://commontag.org/ns#
dc: http://purl.org/dc/terms/
dcterms: http://purl.org/dc/terms/
foaf: http://xmlns.com/foaf/0.1/
gr: http://purl.org/goodrelations/v1#
ical: http://www.w3.org/2002/12/cal/icaltzd#
og: http://ogp.me/ns#
rev: http://purl.org/stuff/rev#
sioc: http://rdfs.org/sioc/ns#
v: http://rdf.data-vocabulary.org/#
vcard: http://www.w3.org/2006/vcard/ns#
schema: http://schema.org/
),
describedby => 'http://www.w3.org/2007/05/powder-s#describedby',
license => 'http://www.w3.org/1999/xhtml/vocab#license',
role => 'http://www.w3.org/1999/xhtml/vocab#role',
},
'http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1' => {
map {; $_ => "http://www.w3.org/1999/xhtml/vocab#$_" }
qw(
alternate appendix cite bookmark contents chapter copyright
first glossary help icon index last license meta next prev
previous section start stylesheet subsection top up p3pv1
)
},
'http://www.w3.org/2011/rdfa-context/html-rdfa-1.1' => {},
'tag:buzzword.org.uk,2010:rdfa:profile:xhtml-role' => {
map {; lc("$_\@role") => "http://www.w3.org/1999/xhtml/vocab#$_" }
@rdfa_10, 'itsRules', @std_roles, @aria_roles,
},
'tag:buzzword.org.uk,2010:rdfa:profile:aria-role' => {
map {; "$_\@role" => "http://www.w3.org/1999/xhtml/vocab#$_" }
@std_roles, @aria_roles,
},
# perl -MWeb::Magic -E'Web::Magic->new("http://www.iana.org/assignments/link-relations/link-relations.xml")->findnodes("//*[local-name()=\"value\"]")->foreach(sub {say $_->textContent})'
'tag:buzzword.org.uk,2010:rdfa:profile:ietf' => {
map {;
"$_\@rel" => "http://www.iana.org/assignments/relation/$_",
"$_\@rev" => "http://www.iana.org/assignments/relation/$_",
}
qw(
alternate appendix archives author bookmark canonical
chapter collection contents copyright current describedby
disclosure duplicate edit edit-media enclosure first
glossary help hub icon index item last latest-version
license lrdd monitor monitor-group next next-archive
nofollow noreferrer payment predecessor-version prefetch
prev previous prev-archive related replies search section
self service start stylesheet subsection
successor-version tag up version-history via
working-copy working-copy-of
)
},
'http://search.yahoo.com/searchmonkey-profile' => {
qw(
abmeta: http://www.abmeta.org/ns#
action: http://search.yahoo.com/searchmonkey/action/
assert: http://search.yahoo.com/searchmonkey/assert/
cc: http://creativecommons.org/ns#
commerce: http://search.yahoo.com/searchmonkey/commerce/
context: http://search.yahoo.com/searchmonkey/context/
country: http://search.yahoo.com/searchmonkey-datatype/country/
currency: http://search.yahoo.com/searchmonkey-datatype/currency/
dbpedia: http://dbpedia.org/resource/
dc: http://purl.org/dc/terms/
fb: http://rdf.freebase.com/
feed: http://search.yahoo.com/searchmonkey/feed/
finance: http://search.yahoo.com/searchmonkey/finance/
foaf: http://xmlns.com/foaf/0.1/
geo: http://www.georss.org/georss#
gr: http://purl.org/goodrelations/v1#
job: http://search.yahoo.com/searchmonkey/job/
media: http://search.yahoo.com/searchmonkey/media/
news: http://search.yahoo.com/searchmonkey/news/
owl: http://www.w3.org/2002/07/owl#
page: http://search.yahoo.com/searchmonkey/page/
product: http://search.yahoo.com/searchmonkey/product/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
reference: http://search.yahoo.com/searchmonkey/reference/
rel: http://search.yahoo.com/searchmonkey-relation/
resume: http://search.yahoo.com/searchmonkey/resume/
review: http://purl.org/stuff/rev#
sioc: http://rdfs.org/sioc/ns#
social: http://search.yahoo.com/searchmonkey/social/
stag: http://semantictagging.org/ns#
tagspace: http://search.yahoo.com/searchmonkey/tagspace/
umbel: http://umbel.org/umbel/sc/
use: http://search.yahoo.com/searchmonkey-datatype/use/
vcal: http://www.w3.org/2002/12/cal/icaltzd#
vcard: http://www.w3.org/2006/vcard/ns#
xfn: http://gmpg.org/xfn/11#
xhtml: http://www.w3.org/1999/xhtml/vocab#
xsd: http://www.w3.org/2001/XMLSchema#
)
},
'tag:buzzword.org.uk,2010:rdfa:profile:html32' => {
map {;
"$_\@rel" => "http://www.w3.org/1999/xhtml/vocab#$_",
"$_\@rev" => "http://www.w3.org/1999/xhtml/vocab#$_",
}
qw(
top contents index glossary copyright next previous help
search chapter made
)
},
'tag:buzzword.org.uk,2010:rdfa:profile:html4' => {
map {;
"$_\@rel" => "http://www.w3.org/1999/xhtml/vocab#$_",
"$_\@rev" => "http://www.w3.org/1999/xhtml/vocab#$_",
}
map {; lc $_ }
qw(
Alternate Stylesheet Start Next Prev Contents Index
Glossary Copyright Chapter Section Subsection Appendix
Help Bookmark
)
},
'tag:buzzword.org.uk,2010:rdfa:profile:html5' => {
map {;
"$_\@rel" => "http://www.w3.org/1999/xhtml/vocab#$_",
"$_\@rev" => "http://www.w3.org/1999/xhtml/vocab#$_",
}
qw(
alternate archives author bookmark external feed first
help icon index last license next nofollow noreferrer
pingback prefetch prev search stylesheet sidebar tag
up ALTERNATE-STYLESHEET
)
},
'http://www.w3.org/2003/g/data-view' => {
map {;
"$_\@rel" => "http://www.w3.org/2003/g/data-view#$_",
"$_\@rev" => "http://www.w3.org/2003/g/data-view#$_",
}
qw(transformation profileTransformation namespaceTransformation)
},
);
sub new
{
my $class = shift;
my @contexts = map { split /\s+/, $_ } @_;
my %self;
foreach my $ctx (reverse @contexts)
{
my %ctx = %{ $Known{$ctx} // +{} };
while (my ($k, $v) = each %ctx)
{
$self{$k} = $v;
}
}
bless(\%self, $class);
}
sub uri_mappings
{
my $self = shift;
+{
map {
(my $prefix = $_) =~ s/:$//;
lc $prefix => $self->{$_}
}
grep { /:$/ }
keys %$self
}
}
sub term_mappings
{
my $self = shift;
my %return;
my @keys = grep { !/:$/ } keys %$self;
foreach my $key (@keys)
{
my ($term, $attr) = split /\@/, $key;
$attr //= '*';
$return{$attr}{lc $term} = $self->{$key};
}
\%return
}
__PACKAGE__
__END__
=head1 NAME
RDF::RDFa::Parser::InitialContext - initially defined lists of prefixes and terms
=head1 DESCRIPTION
This is fairly internal to RDF::RDFa::Parser, but will nevertheless be
documented in due course.
=head1 SEE ALSO
L<RDF::RDFa::Parser>.
=head1 AUTHOR
Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
Copyright 2008-2012 Toby Inkster
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|