RDFNS(1p)
π RDFNS(1p) β the people's namespace looker-upper π
okay bestie, so you know how namespaces are like... everywhere and lowkey a nightmare to remember? yeah. this is the tool that fixes that. it's rdfns, a lil Perl script from the User Contributed Perl Documentation corner of the manual-verse, and it's literally here to find namespaces for you in, like, every format ever invented. β¨
π SYNOPSIS π
she does a lot. here's the whole vibe menu, no cap:
# look up namespaces in several formats
$ rdfns foaf.xmlns foaf.n3 dbpedia.sparql foaf.json
# look up a prefixed URI
$ rdfns rdfs:seeAlso
# look up multiple URIs at a given version
$ rdfns 20111102 foaf,owl.ttl
# lookup preferred prefix
$ rdfns http://www.w3.org/2003/01/geo/wgs84_pos#
# create short name of an URL
$ rdfns http://purl.org/dc/elements/1.1/title
# map prefix to preferred prefix
$ rdfns wgs.prefix
# show all options and some examples
$ rdfns --help
# show version
$ rdfns --version
# list available dates
$ rdfns --dates
the way she just does all of that π periodt.
π FORMATS π
okay so this is the part where it gets iconic. you tell her the file extension and she speaks that language back to you. every single one, here we go:
ttl,n3,notation3β RDF/Turtle or Notation3 syntax, the classic:
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
sparqlβ SPARQL syntax, for when you're feeling query-ful:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
txtβ Tabulator-separated, plain and simple:
foaf http://xmlns.com/foaf/0.1/
xmlnsβ XML namespace declaration, for the XML girlies:
xmlns:foaf="http://xmlns.com/foaf/0.1/"
jsonβ JSON key-values, for instance for JSON-LD. Multiple entries are comma-separated, bestie, don't forget:
"foaf": "http://xmlns.com/foaf/0.1/"
beaconβ BEACON format syntax:
#PREFIX: http://xmlns.com/foaf/0.1/
prefixβ Maps a prefix to its preferred form, this is the shortest and first in alphabetical order. For instancerdfns wgs84.prefixreturns prefixgeo. she's picking the main character prefix for you π«Ά
π SEE ALSO π
This script is internally implemented in App::rdfns, based on RDF::NS. so like, if you wanna go deeper than the script itself, that's where the lore lives. iykyk. π
that's the whole page, bestie!! go look up some namespaces and slay πβ¨πΈ
with love from perl v5.38.2, dated 2024-01-21 β yeah she's been around a minute and she still ate π
π¦ where this page comes from
- debian trixie: librdf-ns-perl 20230619-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-ns-perl 20230619-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: librdf-ns-perl 20230619-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms