RDF::R...nd::RSS(3pm)

🌸 NAME 🌸

okay bestie, so this page is literally about RDF::Redland::RSS β€” the Redland RSS 1.0 Class πŸ’– β€” and also its lil sibling RDF::Redland::RSS::Node β€” the Redland RSS 1.0 Node Class ✨. Two classes, one manpage, both living in the User Contributed Perl Documentation era of the Perl docs. We're serving RSS 1.0 as RDF and we are NOT being normal about it πŸ’….


✨ SYNOPSIS ✨

the vibe check, in code:

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');

note the # UTF-8 in that one print, bestie β€” that's not me being extra, that's in the canon 🫢


πŸ’« DESCRIPTION πŸ’«

it's a class for processing RSS 1.0 as RDF β€” traversing the resulting graph using RSS propertiiies (yes, propertiiies, the extra i's are load-bearing, I don't make the rules 😭) and formatting the output as XHTML. that's it. that's the whole assignment. and it ate.


🧚 CONSTRUCTORS 🧚

  • new SOURCE_URI_STRING [BASE_URI_STRING] β€” processes the RSS 1.0 sitting at source URI SOURCE_URI_STRING. and if you hand over the BASE_URI_STRING string too, then that's what we use as the base URI, not the source URI. iconique behavior.
  • new MODEL β€” processes RSS 1.0 from content stored in RDF::Redland::Model MODEL. yes that's the whole signature. no, there's nothing else. slay.

πŸ‘‘ METHODS πŸ‘‘

  • channels β€” returns the RSS channels (the <channel> tags) as a list of RDF::Redland::RSS::Node objects πŸ’œ
  • items β€” returns the RSS items (the <item> tags) as a list of RDF::Redland::RSS::Node objects ✨
  • image β€” returns the RSS 1.0 image (the <image> tag) as an RDF::Redland::RSS::Node object πŸŽ€
  • textinput β€” returns the RSS 1.0 textinput (the <textinput> tag) as an RDF::Redland::RSS::Node object 🌸
  • as_xhtml (key1 => value1, key2 => value2, ...) β€” returns a formatted XHTML string (or a whole full XHTML document, depending) representing the RSS 1.0 content, with all the various options set as listed in the section below πŸ¦‹

and fr fr, the parameters to this method are mostly from the specification of the viewRssBox macro at http://macros.userland.com/viewRssBox β€” that's the origin story, iykyk.


πŸ’… AS_XHTML OPTIONS πŸ’…

every single dial you can turn, no skips:

  • boxTitle β€” a string, the text displayed in the title of the box. defaults to the title element of the channel. ✨
  • align β€” a string with three possible values: left, right, or the empty string. the HTML table gets left-aligned, right-aligned, or not aligned at all. defaults to the empty string.
  • width β€” a number, the width of the box in pixels. defaults to 125. ⚠️ real talk: the title bar determines the minimum width of the box, so if you're having trouble getting it narrower, try shortening boxTitle. that's not a bug, that's just how it is bestie.
  • frameColor β€” a string, the hex browser color for the frame of the box. defaults to "#000000".
  • titleBarTextColor β€” a string, the hex browser color for the text in the title bar of the box. Defalults to "#000000". (that's Defalults, the original spelling, I'm preserving it with love 🫢)
  • titleBarColor β€” a string, the hex browser color for the title bar of the box. defaults to "#ADD8E6". πŸ’™
  • boxFillColor β€” a string, the hex browser color for the main part of the box. defaults to "#FFFFFF".
  • time β€” a string, text displayed as the time to the right of the box title. defaults to "".
  • hspace β€” a number, the pixels to the left and right of the box. defaults to 0.
  • vspace β€” a number, the pixels above and below the box. defaults to 0.
  • full β€” if set to any value, returns a full XHTML document. defaults to returning an HTML fragment.
  • imageAlign β€” a string with two possible values, left or right. the channel image is either left-aligned or right-aligned. it defaults to right aligned. πŸ‘‘

okay now we're entering the second class's whole zone. deep breath. new section, same energy. πŸ¦‹


🌈 NAME 🌈

RDF::Redland::RSS::Node β€” the Redland RSS 1.0 Node Class ✨


πŸ“ DESCRIPTION πŸ“

it's the class representing concepts in an RSS 1.0 RDF graph. each node is a lil concept, living its best life in the graph πŸ’œ


πŸ’€ CONSTRUCTORS πŸ’€

there are no public constructors. nope, not a single one, don't even look. Nodes are created either by methods of this class or by RDF::Redland::RSS. that's the pipeline.


⭐ METHODS ⭐

  • title β€” get the RSS titles for channel, image, item or textinput. returns either a list or the first one found, depending on calling context. (context-sensitive queen πŸ‘‘)
  • link β€” get the RSS link for channel, image, item or textinput. returns either a list or the first one found, depending on calling context.
  • description β€” get the Dublin Core description element or the RSS description for channel, item or textinput. returns either a list or the first one found, depending on calling context.
  • image_url β€” get the RSS image URL string for an image. returns either a list or the first one found, depending on calling context.
  • name β€” get the RSS name for a textinput. returns either a list or the first one found, depending on calling context.
  • items β€” get the RSS items in a channel as a list of RDF::Redland::RSS::Node objects. πŸŽ€
  • image β€” get the image of a channel as an RDF::Redland::RSS::Node object, or undef if it's not present. no image? undef. we move on.
  • textinput β€” get the textinput of a channel as an RDF::Redland::RSS::Node object, or undef if it's not present. same deal.
  • property PROPERTY β€” get the value of the named property off an RDF::Redland::RSS::Node, where PROPERTY is an RDF::Redland::Node or an RDF::Redland::RSS::Node. returns a list of RDF::Redland::RSS::Node objects, or the first one found, depending on calling context. 🫢
  • properties β€” get all properties off the RDF::Redland::RSS::Node. returns a list of RDF::Redland::RSS::Node objects. all of them. every last one.
  • properties_with_ns_prefix NS_PREFIX β€” get all the 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. πŸ”₯

πŸ”₯ SEE ALSO πŸ”₯

RDF::Redland::Model β€” and also the RSS 1.0 web pages at http://purl.org/rss/1.0/ (go read them, they're the source of truth, no cap)


πŸ’– AUTHOR πŸ’–

Dave Beckett β€” http://www.dajobe.org/ 🌸


and that's the whole page bestie, you made it to the end, so proud of you πŸ₯Ή this was perl v5.42.3, dated 2026-08-20, filed under User Contributed Perl Documentation as RDF::R...nd::RSS(3pm) (yes the middle got squished, that's just the header being dramatic). go forth and traverse that graph. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from