The element has 'element-only' content with a any wildcard which must match the following constraints: & element atom:email ?īut another way to describe this is with some constraints: The person construct is the simplest example of an extensible element in Atom. if the 'image/*' or 'application/*', the content should be xs:base64Ģ.if the 'type' attribute is 'text/*' and not 'text/xml', the content should be xs:string.I expect a user of the schema would have to enumerate these. There may be additional mime types that should be parsed as XML. It might be nice to be able to validate that element. if the 'type' is 'text/xml', the content must contain a single root element.if 'type' is 'xhtml', the content must contain an XHTML 'div' element.if 'type' is 'text', 'html', the content should be xs:string.In the Atom RFC, this construct is re-used all over the place and so one or two good types would cover all the text-typed elements. In certain cases, you can also have a mime type:Įssentially, the 'type' attribute controls the content type of the element. Atom 'text' constructs have one of several forms: I'll assome the 'atom' prefix mapps to ' ' in this document.ġ. Other use cases: Co-constraint Use Cases Description Kake Pugh for originally writing Wiki::Toolkit::Feed::RSS and indeed Wiki::Toolkit itself.Allow expression of the constraints imposed on Atom streams by the Atom spec.
This module is free software you can redistribute it and/or modify it under the same terms as Perl itself. COPYRIGHT AND LICENSEĬopyright 2006-2009 Earle Martin and the Wiki::Toolkit team. Take a feed_timestamp and return a Time::Piece object. You will most likely need this to print a Last-Modified HTTP header so user-agents can determine whether they need to reload the feed or not. Takes the same arguments as recent_changes(). Returns the timestamp of the feed in POSIX::strftime style ("Tue, 12:34:56 GMT"), which is equivalent to the timestamp of the most recent item in the feed. feed_timestamp() print $atom->feed_timestamp()
Generate a very cut down atom feed, based just on the nodes, their locations (if given), and their distance from a reference location (if given). Generate and return an Atom feed for a list of nodes generate_node_name_distance_feed host - the hostname or IP address of the computer used to make the edit if no username is supplied then this will be used as the author for this item. Defaults to 'No description given for change'. username - an identifier for the person who made the edit will be used as the Dublin Core contributor for this item, and also in the RDF description. Your wiki application should make sure to store some or all of the following metadata when calling write_node: comment - a brief comment summarising the edit that has just been made will be used in the summary for this item. The form of this metadata is not mandated by Wiki::Toolkit.
Note: Many of the fields emitted by the Atom generator are taken from the node metadata. If using filter_on_metadata, note that only changes satisfying all criteria will be returned. # Personalise your feed further - consider only changes Print $atom->recent_changes( ignore_minor_edits => 1 ) Print $atom->recent_changes( days => 7 ) Print $atom->recent_changes( items => 50 ) # Or get something other than the default of the latest 15 changes. If not set, will default to the wiki store's encoding. Will be used to specify the character encoding in the feed. make_node_url, if supplied, must be a coderef.Īre used to generate the generator part of the feed. Software_homepage => $your_software_homepage, # e.g. Software_version => $your_software_version, # e.g. Software_name => $your_software_name, # e.g. Site_description => 'My wiki about my stuff',
Print $atom->recent_changes METHODS new() my $atom = Wiki::Toolkit::Feed::Atom->new( Print "Content-type: application/atom+xml\n\n" My $atom = Wiki::Toolkit::Feed::Atom->new( # Set up the RSS feeder with the mandatory arguments - see This module is a straight port of Wiki::Toolkit::Feed::RSS. It outputs the Atom Syndication Format as described at. This is an alternative access to the recent changes of a Wiki::Toolkit wiki. NAME Wiki::Toolkit::Feed::Atom - A Wiki::Toolkit plugin to output RecentChanges Atom.