NAME
Data::DublinCore - DublinCore meta-data access
INHERITANCE
Data::DublinCore
is a XML::Compile::Cache
is a XML::Compile::Schema
is a XML::Compile
SYNOPSIS
my $dc = Data::DublinCore->new(version => '20080211');
my $xml = $dc->writer($sometype)->($doc, $perldata);
my ($type, $data) = $dc->from('data.xml');
my ($type, $data) = Data::DublinCore->from('data.xml');
print "Root type: $type\n";
print Dumper $data; # from Data::Dumper
DESCRIPTION
This module provides access to the DublinCore metadata specification, see http://dublincore.org.
Actually, the dublin-core spec is rather empty: applications need to define the content of the supplied containers themselves. When this content is RDF defined, it seems not to follow the rules of schema's at all. And for other applications I do not know. So... the best thing this module can do is call XML::LibXML::Simple. In the future, however, this may improve.
Extends "DESCRIPTION" in XML::Compile::Cache.
METHODS
Extends "METHODS" in XML::Compile::Cache.
Constructors
Extends "Constructors" in XML::Compile::Cache.
- $obj->from($xmldata, %options)
-
Read an XML message, in any format supported by XML::Compile method
dataToXML()
: string, file, filehandle, and more. Returned is a list of two: the type of the top-level element plus the data-structure.When the method is called as class method, then a temporary instance is created. Creating an instance is (very) slow: reuse is advised.
my $dc = Data::DublinCore->new; my ($type, $data) = $dc->from('data.xml');
or
my ($type, $data) = Data::DublinCore->from('data.xml');
- Data::DublinCore->new(%options)
-
-Option --Defined in --Default allow_undeclared XML::Compile::Cache <false> any_element XML::Compile::Cache 'ATTEMPT' any_type <call XML::LibXML::Simple> block_namespace XML::Compile::Schema [] hook XML::Compile::Schema undef hooks XML::Compile::Schema [] ignore_unused_tags XML::Compile::Schema <false> key_rewrite XML::Compile::Schema [] opts_readers XML::Compile::Cache [] opts_rw XML::Compile::Cache [] opts_writers XML::Compile::Cache [] parser_options XML::Compile <many> prefixes XML::Compile::Cache <smart> schema_dirs XML::Compile undef typemap XML::Compile::Cache {} version <newest> xsi_type XML::Compile::Cache {}
- allow_undeclared => BOOLEAN
- any_element => CODE|'TAKE_ALL'|'SKIP_ALL'|'ATTEMPT'|'SLOPPY'
- any_type => CODE
-
Passed in the reader to XML::Compile::Schema::compile(any_type). Each contained data element which is complex gets passed into XML::LibXML::Simple subroutine XMLin. This provides easy access to for instance rdf data which is stored in there.
- block_namespace => NAMESPACE|TYPE|HASH|CODE|ARRAY
- hook => HOOK|ARRAY
- hooks => ARRAY
- key_rewrite => HASH|CODE|ARRAY
- opts_readers => HASH|ARRAY-of-PAIRS
- opts_rw => HASH|ARRAY-of-PAIRS
- opts_writers => HASH|ARRAY-of-PAIRS
- parser_options => HASH|ARRAY
- prefixes => HASH|ARRAY-of-PAIRS
- schema_dirs => DIRECTORY|ARRAY-OF-DIRECTORIES
- typemap => HASH|ARRAY
- version => STRING
- xsi_type => HASH|ARRAY
Accessors
Extends "Accessors" in XML::Compile::Cache.
- $obj->addHook($hook|LIST|undef)
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addHooks( $hook, [$hook, ...] )
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addKeyRewrite($predef|CODE|HASH, ...)
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addSchemaDirs(@directories|$filename)
- Data::DublinCore->addSchemaDirs(@directories|$filename)
-
Inherited, see "Accessors" in XML::Compile
- $obj->addSchemas($xml, %options)
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addTypemap(PAIR)
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addTypemaps(PAIRS)
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addXsiType( [HASH|ARRAY|LIST] )
-
Inherited, see "Accessors" in XML::Compile::Cache
- $obj->allowUndeclared( [BOOLEAN] )
-
Inherited, see "Accessors" in XML::Compile::Cache
- $obj->anyElement('ATTEMPT'|'SLOPPY'|'SKIP_ALL'|'TAKE_ALL'|CODE)
-
Inherited, see "Accessors" in XML::Compile::Cache
- $obj->blockNamespace($ns|$type|HASH|CODE|ARRAY)
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->hooks( [<'READER'|'WRITER'>] )
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->namespace()
- $obj->typemap( [HASH|ARRAY|PAIRS] )
-
Inherited, see "Accessors" in XML::Compile::Cache
- $obj->useSchema( $schema, [$schema, ...] )
-
Inherited, see "Accessors" in XML::Compile::Schema
- $obj->version()
Prefix management
Extends "Prefix management" in XML::Compile::Cache.
- $obj->addNicePrefix(BASE, NAMESPACE)
-
Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->addPrefixes( [PAIRS|ARRAY|HASH] )
-
Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->learnPrefixes($node)
-
Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->prefix($prefix)
-
Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->prefixFor($uri)
-
Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->prefixed( $type|<$ns,$local> )
-
Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->prefixes( [$params] )
-
Inherited, see "Prefix management" in XML::Compile::Cache
Compilers
Extends "Compilers" in XML::Compile::Cache.
- $obj->addCompileOptions( ['READERS'|'WRITERS'|'RW'], %options )
-
Inherited, see "Compilers" in XML::Compile::Cache
- $obj->compile( <'READER'|'WRITER'>, $type, %options )
-
Inherited, see "Compilers" in XML::Compile::Schema
- $obj->compileAll( ['READERS'|'WRITERS'|'RW', [$ns]] )
-
Inherited, see "Compilers" in XML::Compile::Cache
- $obj->compileType( <'READER'|'WRITER'>, $type, %options )
-
Inherited, see "Compilers" in XML::Compile::Schema
- $obj->dataToXML($node|REF-XML|XML-STRING|$filename|$fh|$known)
- Data::DublinCore->dataToXML($node|REF-XML|XML-STRING|$filename|$fh|$known)
-
Inherited, see "Compilers" in XML::Compile
- $obj->initParser(%options)
- Data::DublinCore->initParser(%options)
-
Inherited, see "Compilers" in XML::Compile
- $obj->reader($type|$name, %options)
-
Inherited, see "Compilers" in XML::Compile::Cache
- $obj->template( <'XML'|'PERL'|'TREE'>, $element, %options )
-
Inherited, see "Compilers" in XML::Compile::Schema
- $obj->writer($type|$name)
-
Inherited, see "Compilers" in XML::Compile::Cache
Administration
Extends "Administration" in XML::Compile::Cache.
- $obj->declare( <'READER'|'WRITER'|'RW'>, <$type|ARRAY>, %options )
-
Inherited, see "Administration" in XML::Compile::Cache
- $obj->doesExtend($exttype, $basetype)
-
Inherited, see "Administration" in XML::Compile::Schema
- $obj->elements()
-
Inherited, see "Administration" in XML::Compile::Schema
- $obj->findName($name)
-
Inherited, see "Administration" in XML::Compile::Cache
- $obj->findSchemaFile($filename)
- Data::DublinCore->findSchemaFile($filename)
-
Inherited, see "Administration" in XML::Compile
- $obj->importDefinitions($xmldata, %options)
-
Inherited, see "Administration" in XML::Compile::Schema
- $obj->knownNamespace($ns|PAIRS)
- Data::DublinCore->knownNamespace($ns|PAIRS)
-
Inherited, see "Administration" in XML::Compile
- $obj->namespaces()
-
Inherited, see "Administration" in XML::Compile::Schema
- $obj->printIndex( [$fh], %options )
-
Inherited, see "Administration" in XML::Compile::Cache
- $obj->types()
-
Inherited, see "Administration" in XML::Compile::Schema
- $obj->walkTree($node, CODE)
-
Inherited, see "Administration" in XML::Compile
DETAILS
Extends "DETAILS" in XML::Compile::Cache.
DESCRIPTIONS
Extends "DESCRIPTIONS" in XML::Compile::Cache.
SEE ALSO
This module is part of Data-DublinCore distribution version 1.00, built on juli 21, 2015. Website: http://perl.overmeer.net
COPYRIGHTS
Copyrights of the perl code and the related documentation by 2009-2015 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html