Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml::commonns(3pm) [debian man page]

XML::CommonNS(3pm)					User Contributed Perl Documentation					XML::CommonNS(3pm)

NAME
XML::CommonNS - A list of commonly used namespaces 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 All you need do to use this module is import the namespaces you want from the list below. All of those will then become available to you. They are XML::NamespaceFactory object and can thus be used both as simple strings and as XML::NamespaceFactory objects. See XML::NamespaceFactory for how that may help you. I hesitated for a while before releasing this module. As a directory of namespaces that can't (and almost certainly shouldn't) be exhaustive, it implies editorial decisions and I wasn't certain it was CPAN worthy. However, after getting really tired of tracking down namespaces in every single small XML muning script I made, I wrote it for myself. After a while using it, I don't see why others wouldn't find it useful as well. NAMESPACES
The currently available namespaces are listed below. Should you consider one worthy of addition (it needs to be common enough) please simply notify me. Those marked with a start are subject to change. I WILL change them when the corresponding specification changes. 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 Allows you to directly retrieve one of the URI objects without doing the import() dance. AUTHOR
Chris Prather, <chris@prather.org> Robin Berjon, <robin.berjon@expway.fr> COPYRIGHT AND LICENSE
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. perl v5.10.1 2011-03-05 XML::CommonNS(3pm)

Check Out this Related Man Page

RDF::Closure(3pm)					User Contributed Perl Documentation					 RDF::Closure(3pm)

NAME
RDF::Closure - pure Perl RDF inferencing SYNOPSIS
use RDF::Trine::Iterator qw[sgrep]; use RDF::Closure qw[iri mk_filter FLT_NONRDF FLT_BORING]; my $data = iri('http://bloggs.example.com/foaf.rdf'); my $foaf = iri('http://xmlns.com/foaf/0.1/index.rdf'); my $model = RDF::Trine::Model->temporary_model; my $p = 'RDF::Trine::Parser'; $p->parse_url_into_model($data->uri, $model, context => $data->uri); $p->parse_url_into_model($foaf->uri, $model, context => $foaf->uri); my $cl = RDF::Closure::Engine->new('rdfs', $model); $cl->closure; my $filter = mk_filter(FLT_NONRDF|FLT_BORING, [$foaf]); my $output = &sgrep($filter, $model->as_stream); print RDF::Trine::Serializer ->new('RDFXML') ->serialize_iterator_to_string($output); DESCRIPTION
This distribution is a pure Perl RDF inference engine designed as an add-in for RDF::Trine. It is largely a port of Ivan Herman's Python RDFClosure library, though there has been some restructuing, and there are a few extras thrown in. Where one of the Perl modules has a direct equivalent in Ivan's library, this is noted in the POD. Functions This package inherits from RDF::Trine and exports the same functions, plus: o "mk_filter($basic_filters, $ignore_contexts)" Creates a filter (coderef) suitable for use with "sgrep" from RDF::Trine::Iterator. $basic_filters is an integer which can be assembled by bitwise-OR-ing the constants "FLT_NONRDF" and "FLT_BORING". $ignore_contexts is an arrayref of RDF::Trine::Node objects, each of which represents a context that should be filtered out. use RDF::Trine::Iterator qw[sgrep]; use RDF::Closure qw[iri mk_filter FLT_NONRDF FLT_BORING]; my $foaf = iri('http://xmlns.com/foaf/0.1/index.rdf'); my $filter = mk_filter(FLT_NONRDF|FLT_BORING, [$foaf]); my $remaining = &sgrep($filter, $model->as_stream); # $remaining is now an iterator which will return all triples # from $model except: those in the FOAF named graph, those which # are non-RDF (e.g. literal subject) and those which are boring. Which triples are boring? Any triple of the form { ?x owl:sameAs ?x .}, { ?x owl:equivalentProperty ?x .}, { ?x owl:equivalentClass ?x .}, { ?x rdfs:subPropertyOf ?x .} or { ?x rdfs:subClassOf ?x .} is boring (i.e. where these statements have the same term in subject and object position). Any triple where the subject, predicate and object nodes are all in the RDF, RDFS, OWL or XSD namespaces is boring. Other triples are not boring. For convenience, "RDF::Closure" also exports variables called $RDF, $RDFS, $OWL and $XSD which are RDF::Trine::Namespace objects. SEE ALSO
RDF::Closure::Engine, RDF::Closure::Model, RDF::Trine::Parser::OwlFn. RDF::Trine, RDF::Query. <http://www.perlrdf.org/>. http://www.ivan-herman.net/Misc/2008/owlrl/ <http://www.ivan-herman.net/Misc/2008/owlrl/>. AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT
Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: o The Artistic License 1.0 <http://www.perlfoundation.org/artistic_license_1_0>. o The GNU General Public License Version 1 http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt <http://www.gnu.org/licenses/old- licenses/gpl-1.0.txt>, or (at your option) any later version. o The W3C Software Notice and License http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 <http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231>. o The Clarified Artistic License <http://www.ncftp.com/ncftp/doc/LICENSE.txt>. 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. perl v5.14.2 2012-06-28 RDF::Closure(3pm)
Man Page