DOKK / manpages / debian 12 / librdf-perl / RDF::Redland::RSS.3pm.en
RDF::Redland::RSS(3pm) User Contributed Perl Documentation RDF::Redland::RSS(3pm)

RDF::Redland::RSS - Redland RSS 1.0 Class

  use RDF::Redland::RSS;
  ...
  my $rss=RDF::Redland::RSS->new_from_model($model);
  my $rss2=new RDF::Redland::RSS("http://example.com/test.rdf");
  ...
  for my $channel ($rss->channels) {
    ...
   print "channel title is ",$channel->title->as_string,"\n"; # UTF-8
  }
  my(@items)=$channel->items;
  # Print channel items (URI, title)
  for my $item (@items) {
    print "item ",$item->uri->as_string, " ", $item->title->as_string, "\n";
  }
  ...
  print $rss->as_xhtml(width => 320, align => 'right');

A class for processing RSS 1.0 as RDF, traversing the resulting graph using RSS propertiiies and formatting the output as XHTML.

Process RSS 1.0 at source URI SOURCE_URI_STRING. If the BASE_URI_STRING string is given then use that as the base URI rather than the source URI.
Process RSS 1.0 from content stored in RDF::Redland::Model MODEL.

Return the RSS channels (<channel> tags) as a list of RDF::Redland::RSS::Node objects.
Return the RSS items (<item> tags) as a list of RDF::Redland::RSS::Node objects.
Return the RSS 1.0 image (<image> tag) as an RDF::Redland::RSS::Node object.
Return the RSS 1.0 textinput (<textinput> tag) as an RDF::Redland::RSS::Node object.
Return a formatted XHTML string (or full XHTML document) representing the RSS 1.0 content with various options set as listed in the section below.

The parameters to this method are mostly from the specification of the viewRssBox macro at http://macros.userland.com/viewRssBox

A string, is the text displayed in the title of the box. It defaults to the title element of the channel.
A string, has three possible values, left, right or the empty string. The HTML table is either left-aligned, right-aligned or not aligned. It defaults to the empty string.
A number, is the width of the box, in pixels. It defaults to 125. Note that the title bar determines the minimum width of the box, if you're having trouble getting it to be narrower, try shortening boxTitle.
A string, is the hex browser color for the frame of the box. Defaults to "#000000".
A string, is the hex browser color for the text in the title bar of the box. Defalults to "#000000".
A string, is the hex browser color for the title bar of the box. Defaults to "#ADD8E6".
A string, is the hex browser color for the main part of the box. Defaults to "#FFFFFF".
A string, is text that's displayed as the time to the right of the box title. Defaults to "".
A number, is the number of pixels to the left and right of the box. Defaults to 0.
A number, is the number of pixels above and below the box. Defaults to 0.
If set to any value, returns a full XHTML document. Defaults to returning an HTML fragment.
A string, has two possible values, left or right. The channel image is either left-aligned or right-aligned. It defaults to right aligned.

RDF::Redland::RSS::Node - Redland RSS 1.0 Node Class

Class representing concepts in an RSS 1.0 RDF graph.

No public constructors. Nodes are created either by methods of this class or RDF::Redland::RSS.

Get the RSS titles for channel, image, item or textinput. Returns either a list or first one found depending on calling context.
Get the RSS link for channel, image, item or textinput. Returns either a list or first one found depending on calling context.
Get the Dublin Core description element or RSS description for channel, item or textinput. Returns either a list or first one found depending on calling context.
Get the RSS image URL string for an image. Returns either a list or first one found depending on calling context.
Get the RSS name for a textinput. Returns either a list or first one found depending on calling context.
Get the RSS items in a channel as a list of RDF::Redland::RSS::Node objects.
Get the image of a channel as an RDF::Redland::RSS::Node object or undef if not present.
Get the textinput of a channel as an RDF::Redland::RSS::Node object or undef if not present.
Get the value of the named property off an RDF::Redland::RSS::Node where PROPERTY is an RDF::Redland::Node or RDF::Redland::RSS::Node. Returns a list of RDF::Redland::RSS::Node objects or first one found depending on calling context.
Get all properties off the RDF::Redland::RSS::Node. Returns a list of RDF::Redland::RSS::Node objects.
Get all unique properties of the RDF::Redland::RSS::Node which have namespace URI prefix NS_PREFIX. Returns a list of the properties as RDF::Redland::RSS::Node objects.

RDF::Redland::Model and RSS 1.0 web pages at http://purl.org/rss/1.0/

Dave Beckett - http://www.dajobe.org/

2023-01-31 perl v5.36.0