RDF Site Summary 1.0 Modules: mod_enclosure
Authors
- Suzan Foster
Version
0.1 2004-11-27 Initial draft0.2 2004-11-27 Added multiple enclosure example and removed faulty complex example.0.3 2005-04-09 Incorporated suggestions from Lucas Gonze[7].0.4 2005-04-09 Deprecated enc:url attribute as suggested by Dan Brickley[8].Status
Rights
Copyright © 2004 - 2005 by the Authors.
Description
This module is intended to implement the concept of enclosures [1] for RDF Site Summary 1.0 [2]. The module uses the properties as defined in the RDF Schema for RSS 2.0 Enclosures [3].
Namespace Declarations
- xmlns:enc="http://purl.oclc.org/net/rss_2.0/enc#"
Model
<item> Element:
- <enc:enclosure> ( EMPTY )
<enc:enclosure> Attributes:
- rdf:resource ( CDATA #REQUIRED )
- enc:url ( CDATA #REQUIRED )
- enc:type ( CDATA #IMPLIED )
- enc:length ( CDATA #IMPLIED )
rdf:resource
The rdf:resource element is part of the RDF/XML core syntax terms[9]. This attribute specifies the location of the resource referenced by the enclosure element. This attribute MUST have a value conforming to an RDF URI reference[10].
enc:url - DEPRECATED
enc:url has been deprecated in favour of rdf:resource.
enc:type
This attribute gives an advisory hint as to the content type of the content available at the link target address. It allows user agents to opt to use a fallback mechanism rather than fetch the content if they are advised that they will get content in a content type they do not support. Authors who use this attribute take responsibility to manage the risk that it may become inconsistent with the content available at the link target address.For the current list of registered content types, please consult [5].
enc:length
This attribute gives an advisory hint as to the content length of the content available at the link target address. It allows user agents to opt to select between alternatives or reject based on expected file size. Authors who use this attribute take responsibility to manage the risk that it may become inconsistent with content available at the link target address.This attribute MUST have a value conforming to XML Schema nonNegativeInteger[6].
Examples
Example with single enclosure element:
... <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:enc="http://purl.oclc.org/net/rss_2.0/enc#" xmlns="http://purl.org/rss/1.0/"> ... <item rdf:about="http://foo.bar/baz"> <title>There's no pleasing some people..</title> ... <enc:enclosure rdf:resource="http://foo.bar/baz.mp3" enc:type="audio/mpeg" enc:length="65535"/> </item> ... </rdf:RDF> ...Example with alternative enclosure elements:
... <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:enc="http://purl.oclc.org/net/rss_2.0/enc#" xmlns="http://purl.org/rss/1.0/"> ... <item rdf:about="http://foo.bar/baz"> <title>There's no pleasing some people..</title> ... <enc:enclosure rdf:resource="http://foo.bar/baz.mp3" enc:type="audio/mpeg" enc:length="65535"/> <enc:enclosure rdf:resource="http://foo.bar/baz.mp3.torrent" enc:type="application/x-bittorrent" enc:length="655"/> </item> ... </rdf:RDF> ...Example with foaf and creative commons metadata.
... <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:enc="http://purl.oclc.org/net/rss_2.0/enc#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:cc="http://web.resource.org/cc/" xmlns="http://purl.org/rss/1.0/"> ... <item rdf:about="http://foo.bar/baz"> <title>There's no pleasing some people..</title> ... <enc:enclosure rdf:resource="http://foo.bar/baz.mp3" enc:type="audio/mpeg" enc:length="65535"/> </item> <enc:Enclosure rdf:about="http://foo.bar/baz.mp3"> <dc:creator foaf:mbox_sha1sum="928de0d623d7f6f073a8d84d8c269f2051af29d6" foaf:name="Suzan Foster"/> <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/"/> </enc:Enclosure> <cc:License rdf:about="http://creativecommons.org/licenses/by-nc-nd/2.0/"> <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/> <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/> <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/> <cc:requires rdf:resource="http://web.resource.org/cc/Notice"/> <cc:requires rdf:resource="http://web.resource.org/cc/Attribution"/> </cc:License> ... </rdf:RDF> ...References
- http://blogs.law.harvard.edu/tech/rss#ltenclosuregtSubelementOfLtitemgt
- http://purl.org/rss/1.0/
- http://purl.oclc.org/net/rss_2.0/enc#
- http://www.w3.org/TR/xmlschema-2/#anyURI
- List of registered content types (MIME types).
- http://www.w3.org/TR/xmlschema-2/#dt-nonNegativeInteger
- http://groups.yahoo.com/group/rss-dev/message/7111
- http://groups.yahoo.com/group/rss-dev/message/7117
- http://www.w3.org/TR/rdf-syntax-grammar/#coreSyntaxTerms
- http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref