1 package XML::RSS::Private::Output::V1_0;
8 use XML::RSS::Private::Output::Base;
9 use XML::RSS::Private::Output::Roles::ModulesElems;
11 @ISA = (qw(XML::RSS::Private::Output::Roles::ModulesElems XML::RSS::Private::Output::Base));
13 sub _get_top_elem_about {
14 my ($self, $tag, $about_sub) = @_;
15 return ' rdf:about="' . $self->_encode($about_sub->()) . '"';
18 sub _out_textinput_rss_1_0_elems {
21 $self->_out_dc_elements($self->textinput());
24 # TODO : Should this follow the %rdf_resources conventions of the items'
25 # and channel's modules' support ?
26 while (my ($url, $prefix) = each %{$self->_modules()}) {
27 next if $prefix =~ /^(dc|syn|taxo)$/;
28 while (my ($el, $value) = each %{$self->textinput($prefix) || {}}) {
29 $self->_out_ns_tag($prefix, $el, $value);
34 sub _get_rdf_decl_open_tag {
42 sub _get_first_rdf_decl_mappings {
44 ["rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"],
45 [undef, "http://purl.org/rss/1.0/"]
49 sub _out_image_dc_elements {
51 return $self->_out_dc_elements($self->image());
54 sub _out_item_1_0_tags {
55 my ($self, $item) = @_;
57 $self->_out_dc_elements($item);
60 $self->_output_taxo_topics($item);
63 sub _output_rss_middle {
66 # PICS rating - Dublin Core has not decided how to incorporate PICS ratings yet
67 #$$output .= '<rss091:rating>'.$self->{channel}->{rating}.'</rss091:rating>'."\n"
68 #$if $self->{channel}->{rating};
70 $self->_out_copyright();
73 $self->_out_defined_tag("dc:date", $self->_calc_dc_date());
76 #$output .= '<rss091:docs>'.$self->{channel}->{docs}.'</rss091:docs>'."\n"
77 #if $self->{channel}->{docs};
81 $self->_out_all_modules_elems;
83 $self->_out_seq_items();
85 if ($self->_is_image_defined()) {
86 $self->_out('<image rdf:resource="' .
87 $self->_encode($self->image('url')) . "\" />\n"
91 if (defined(my $textinput_link = $self->textinput('link'))) {
92 $self->_out('<textinput rdf:resource="'
93 . $self->_encode($textinput_link) . "\" />\n"
99 $self->_output_main_elements;