XML::CommonNS(3pm)

πŸ’– XML::CommonNS πŸ’–

okay bestie, so this is a Perl module from the User Contributed Perl Documentation crowd, and it's literally just a big ol' list of namespaces you're gonna use all the time. no cap. πŸŽ€


✨ NAME ✨

XML::CommonNS β€” a whole directory of the namespaces everybody keeps needing, so you don't have to go hunting for them every single time. it's giving "commonly used namespaces" and it's giving it flawlessly. πŸ¦‹


🌸 SYNOPSIS 🌸

# import $RDF, $RDFS, $OWL, $DC
use XML::CommonNS qw(RDF RDFS OWL DC);

my %CONFIG = (
    Namespaces    => {
        rdf  => "$RDF",
        rdfs => "$RDFS",
        owl  => "$OWL",
        foaf => "$FOAF",
    },
    ExpandQNames => 1,
);

# or the uri() method

my $foaf = XML::CommonNS->uri('FOAF');

πŸ’… DESCRIPTION πŸ’…

so the whole vibe here is: you just import whichever namespaces you want from the list below, and boom, they're yours. ✨ every one of them is an XML::NamespaceFactory object, which means they work as plain old strings and as XML::NamespaceFactory objects. want to know why that's lowkey amazing? go peek at XML::NamespaceFactory, it explains itself. πŸ’–

ngl, the author hesitated for a while before releasing this one. 😭 because like, a directory of namespaces can't be exhaustive (and honestly almost certainly shouldn't be), so it's full of editorial decisions, and he wasn't sure it was even CPAN worthy. but then he got so tired of tracking down namespaces in every single tiny XML muning script he wrote, that he just wrote it for himself. and after using it for a bit, he was like "why wouldn't everyone else find this useful too?" and honestly? he ate. πŸ‘‘


πŸ¦‹ NAMESPACES πŸ¦‹

here's everything currently available, bestie. if you think one deserves to be added β€” and it has to be common enough, that's the bar β€” just slide into the author's mentions and let him know. 🫢

those marked with a star are subject to change. and not like "maybe" subject to change. he WILL change them when the corresponding specification changes. periodt. (the original says "start" instead of "star" β€” typos are iconic, we keep them πŸ₯°)

XML             http://www.w3.org/XML/1998/namespace
XMLNS           http://www.w3.org/2000/xmlns/
XLINK           http://www.w3.org/1999/xlink
SVG             http://www.w3.org/2000/svg
XHTML           http://www.w3.org/1999/xhtml
XHTML2          http://www.w3.org/2002/06/xhtml2
XFORMS          http://www.w3.org/2002/xforms/cr
XMLEVENTS       http://www.w3.org/2001/xml-events
DC                      http://purl.org/dc/elements/1.1/
DC_TERMS        http://purl.org/dc/terms/
RDF             http://www.w3.org/1999/02/22-rdf-syntax-ns#
RDFS            http://www.w3.org/2000/01/rdf-schema#
OWL                     http://www.w3.org/2002/07/owl#
FOAF        http://xmlns.com/foaf/0.1/
REL             http://purl.org/vocab/relationship/
RSS1        http://purl.org/rss/1.0/
COMMENTS        http://purl.org/net/rssmodules/blogcomments/
SYN                 http://purl.org/rss/1.0/modules/syndication/
RNG             http://relaxng.org/ns/structure/1.0
XSD             http://www.w3.org/2001/XMLSchema
XSI             http://www.w3.org/2001/XMLSchema-instance
MATHML          http://www.w3.org/1998/Math/MathML
XSLT            http://www.w3.org/1999/XSL/Transform
XSLFO           http://www.w3.org/1999/XSL/Format
SOAPENC11       http://schemas.xmlsoap.org/soap/encoding/
SOAPENV11       http://schemas.xmlsoap.org/soap/envelope/
SOAPENC12       http://www.w3.org/2003/05/soap-encoding
SOAPENV12       http://www.w3.org/2003/05/soap-envelope
WSDL11          http://schemas.xmlsoap.org/wsdl/
WSDL12          http://www.w3.org/2003/06/wsdl

🌈 METHODS 🌈

  • uri β€” lets you grab one of the URI objects directly, no import() dance required. main character energy fr fr. πŸ’…

πŸ‘‘ AUTHOR πŸ‘‘

Chris Prather, <chris@prather.org> Robin Berjon, <robin.berjon@expway.fr>


Copyright 2003 by Robin Berjon

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


and that's the whole page, bestie πŸŽ€ this was XML::CommonNS(3pm), served up fresh by perl v5.34.0 on 2022-06-28. go forth and namespace responsibly. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from