r9361 - in /branches/upstream/libxml-rsslite-perl: ./ current/ current/t/

emhn-guest at users.alioth.debian.org emhn-guest at users.alioth.debian.org
Thu Nov 15 20:13:54 UTC 2007


Author: emhn-guest
Date: Thu Nov 15 20:13:54 2007
New Revision: 9361

URL: http://svn.debian.org/wsvn/?sc=1&rev=9361
Log:
[svn-inject] Installing original source of libxml-rsslite-perl

Added:
    branches/upstream/libxml-rsslite-perl/
    branches/upstream/libxml-rsslite-perl/current/
    branches/upstream/libxml-rsslite-perl/current/CHANGES
    branches/upstream/libxml-rsslite-perl/current/MANIFEST
    branches/upstream/libxml-rsslite-perl/current/Makefile.PL
    branches/upstream/libxml-rsslite-perl/current/README
    branches/upstream/libxml-rsslite-perl/current/RSSLite.pm
    branches/upstream/libxml-rsslite-perl/current/TODO
    branches/upstream/libxml-rsslite-perl/current/t/
    branches/upstream/libxml-rsslite-perl/current/t/01basic.t
    branches/upstream/libxml-rsslite-perl/current/t/02rss.t
    branches/upstream/libxml-rsslite-perl/current/t/journal.rss
    branches/upstream/libxml-rsslite-perl/current/t/sampleRSS.xml

Added: branches/upstream/libxml-rsslite-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/CHANGES?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/CHANGES (added)
+++ branches/upstream/libxml-rsslite-perl/current/CHANGES Thu Nov 15 20:13:54 2007
@@ -1,0 +1,32 @@
+Revision history for Perl extension XML::RSSLite.
+
+0.11	Mon Feb 24 06:25:54 UTC 2003
+	Vast speed and memory requirement improvements for deep structures.
+
+	Fixed bug where attributes of a tag with no content were dropped.
+
+	Fixed buglet where "empty" (all whitespace) content was added to tree.
+
+0.10	Sun Feb 23 02:26:04 UTC 2003
+	Rewrote the parser, subsequently squashing bugs, and future-proofing.
+
+	THIS VERSION BREAKS BACKWARDS COMPATIBILITY
+	It is very similar and should require only minor changes,
+	but it is not a drop-in upgrade. See the README.
+
+	Fixed a bug resulting from a lack of DWIM;
+	'+', '-', and '9' were being stripped from the RSS feed
+
+0.08	Wed May  1 02:51:51 UTC 2002
+
+	Improved efficiency of parseXML, also allow [ and ]
+
+	Removed Data::Dumper.
+
+0.07	Thu Mar 21 16:38:04 UTC 2002
+
+	If we don't have a title, use the link.
+
+0.06	Thu Oct 19 19:05 2000
+
+	Initial offering.

Added: branches/upstream/libxml-rsslite-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/MANIFEST?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/MANIFEST (added)
+++ branches/upstream/libxml-rsslite-perl/current/MANIFEST Thu Nov 15 20:13:54 2007
@@ -1,0 +1,10 @@
+CHANGES
+MANIFEST
+README
+TODO
+Makefile.PL
+RSSLite.pm
+t/01basic.t
+t/02rss.t
+t/journal.rss
+t/sampleRSS.xml

Added: branches/upstream/libxml-rsslite-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/Makefile.PL?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/Makefile.PL (added)
+++ branches/upstream/libxml-rsslite-perl/current/Makefile.PL Thu Nov 15 20:13:54 2007
@@ -1,0 +1,8 @@
+use ExtUtils::MakeMaker;
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written.
+WriteMakefile(
+    'NAME'		=> 'XML::RSSLite',
+    'VERSION_FROM'	=> 'RSSLite.pm', # finds $VERSION
+    'PREREQ_PM'		=> {}, # e.g., Module::Name => 1.1
+);

Added: branches/upstream/libxml-rsslite-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/README?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/README (added)
+++ branches/upstream/libxml-rsslite-perl/current/README Thu Nov 15 20:13:54 2007
@@ -1,0 +1,48 @@
+
+	THIS VERSION BREAKS BACKWARDS COMPATIBILITY
+	It is very similar and should require only minor changes,
+	but it is not a drop-in upgrade.
+
+          parseXML is now parseRSS
+
+Okay, apparently a few people actually use this, so I should probably release
+a new version. I've actually had this done for almost a year now but I wanted
+to write a real test suite for it, maybe next time. Instead, all I can say is
+I've been *using* it for the last year without a problem. Please provide me
+with a copy of any document wish it chokes on when making a bug report.
+
+=============================================================================
+
+XML::RSSLite is a meant as a relaxed parser+,* and lightweight+,++
+replacement for XML::RSS. In fact, it contains a generic lightweight
+XML pseudo-parser** that can be used for other content.
+
+For RSS/RDF/weblog/Scripting News content parseRSS does the following:
+
+    o Remove html tags to leave plain text
+
+    o Remove characters other than 0-9~!@#$%^&*()-+=a-zA-Z[];',.:"<>?\s
+
+    o Use <url> tags when <link> is empty
+
+    o Use misplaced urls in <title> when <link> is empty
+
+    o Exract links from <a href=...> if required   
+
+    o Limit links to ftp and http
+
+    o Join relative urls to the site base
+
+If you can make a convincing argument against any of these behaviors they
+may be relaxed. Otherwise, you might use parseXML.
+
++     Under certain circumstances; not valid during leap years, full
+      moons, high tides, vernal equinoxes, or Wednesdays. YMMV.
+
+*     We hope, the new parser may be too strict, please provide samples
+      of content which you believe should parse but does not.
+
+++    The new found "correctness" comes at a performance cost, it is
+      slower than prior versions, but still faster than XML::RSS.
+
+**    Not fully compliant with the W3C specifications.

Added: branches/upstream/libxml-rsslite-perl/current/RSSLite.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/RSSLite.pm?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/RSSLite.pm (added)
+++ branches/upstream/libxml-rsslite-perl/current/RSSLite.pm Thu Nov 15 20:13:54 2007
@@ -1,0 +1,462 @@
+#!/usr/bin/perl
+package XML::RSSLite;
+use strict;
+use vars qw($VERSION);
+
+$VERSION = 0.11;
+
+sub import{
+  no strict 'refs';
+  shift;
+  my $pkg = scalar caller();
+  *{"${pkg}::parseRSS"} = \&parseRSS;
+  *{"${pkg}::parseXML"} = \&parseXML if grep($_ eq 'parseXML', @_);
+}
+
+
+sub parseRSS {
+  my ($rr, $cref) = @_;
+
+  die "$rr is not a hash reference"     unless ref($rr)   eq 'HASH';
+  die "$cref is not a scalar reference" unless ref($cref) eq 'SCALAR';
+
+  # Gotta have some content to parse
+  return unless $$cref;
+
+  preprocess($cref);
+  {
+    _parseRSS($rr, $cref), last if index(${$cref}, '<rss')+1;
+    _parseRDF($rr, $cref), last if index(${$cref}, '<rdf:RDF')+1;
+    _parseSN( $rr, $cref), last if index(${$cref}, '<scriptingnews')+1;
+    _parseWL( $rr, $cref), last if index(${$cref}, '<weblog')+1;
+    die "Content must be RSS|RDF|ScriptingNews|Weblog|reasonably close";
+  }
+  postprocess($rr);
+}
+
+sub preprocess {
+  my $cref = shift;
+  $$cref =~ y/\r\n/\n/s;
+  $$cref =~ y{\n\t ~0-9\-+!@#$%^&*()_=a-zA-Z[]\\;':",./<>?}{ }cs;
+  #XXX $$cref =~ s/&(?!0[a-zA-Z0-9]+|#\d+);/amp/gs;
+  #XXX Do we wish to (re)allow escaped HTML?!
+  $$cref =~ s{(?:<|&lt;)/?(?:b|i|h\d|p|center|quote|strong)(?:>|&gt;)}{}gsi;
+}
+
+sub _parseRSS {
+  parseXML($_[0], $_[1], 'channel', 0); 
+  $_[0]->{'items'} = $_[0]->{'item'};
+}
+
+sub _parseRDF {
+  my ($rr, $cref) = @_;
+
+  $rr->{'items'} = [];
+  my $item; 
+
+  parseXML($_[0], $_[1], 'rdf:RDF', 0); 
+
+  # Alias RDF to RSS
+  if( exists($rr->{'item'}) ){
+    $rr->{'items'} = $rr->{'item'};
+  }
+  else{
+    my $li = $_[0]->{'rdf:li'} || $_[0]->{'rdf:Seq'}->{'rdf:li'};
+    foreach $item ( @{$li} ){
+      my %ia;
+      if (exists $item->{'dc:description'}) {
+	$ia{'description'} = $item->{'dc:description'};
+      }  
+      if (exists $item->{'dc:title'}) {
+	$ia{'title'} = $item->{'dc:title'};
+      }  
+      if (exists $item->{'dc:identifier'}) {
+	$ia{'link'} = delete($item->{'dc:identifier'});
+      }  
+      
+      push(@{$rr->{'items'}}, \%ia); 
+    }
+  }
+}
+
+sub _parseSN {
+  my ($rr, $cref) = @_;
+  
+  $rr->{'items'} = ();
+  my $item; 
+
+  parseXML($rr, $cref, 'channel', 0); 
+  
+  # Alias SN to RSS terms
+  foreach $item ( @{$_[0]->{'rdf:li'}} ){
+    my %ia;
+    if (exists $item->{'text'}) {
+      $ia{'description'} = $item->{'text'};
+    }  
+    if (exists $item->{'linetext'}) {
+      $ia{'title'} = $item->{'linetext'};
+    }  
+    if (exists $item->{'url'}) {
+      $ia{'link'} = $item->{'url'};
+    }  
+
+    push(@{$rr->{'items'}}, \%ia); 
+  }
+}
+
+
+sub _parseWL {
+  my ($rr, $cref) = @_;
+
+  $rr->{'items'} = ();
+  my $item; 
+
+  #XXX is this the right tag to parse for?
+  parseXML($rr, $cref, 'channel', 0); 
+  
+  # Alias WL to RSS
+  foreach $item ( @{$_[0]->{'rdf:li'}} ){
+    my %ia;
+    if (exists $item->{'url'}) {
+      $ia{'link'} = delete($item->{'url'});
+    }
+
+    push(@{$rr->{'items'}}, \%ia); 
+  }
+}
+
+
+sub postprocess {
+  my $rr = shift;
+
+  #XXX Not much to do, what about un-munging URL's in source, etc.?!
+  return unless defined($rr->{'items'});
+  $rr->{'items'} = [$rr->{'items'}] unless ref($rr->{'items'}) eq 'ARRAY';
+
+  foreach my $i (@{$rr->{'items'}}) {
+    $i->{description} = $i->{description}->{'<>'} if ref($i->{description});
+
+    # Put stuff into the right name if necessary
+    if( not $i->{'link'} ){
+      if( defined($i->{'url'}) ){
+	$i->{'link'} = delete($i->{'url'}); }
+      # See if you can use misplaced url in title for empty links
+      elsif( exists($i->{'title'}) ){
+	# The next case would trap this, but try to short-circuit the gathering
+	if ($i->{'title'} =~ /^(?:ht)|ftp:/) {
+	  $i->{'link'} = $i->{'title'};
+	}
+	elsif ($i->{'title'} =~ /"((?:ht)|ftp.*?)"/) {
+	  $i->{'link'} = $1;
+	  $i->{'title'} =~ s/<.*?>//;
+	}
+	else {
+	  next;
+	}
+      }
+    }
+    
+    # Make sure you've got an http/ftp link
+    if( exists( $i->{'link'}) && $i->{'link'} !~ m{^(http|ftp)://}i) {
+      ## Rip link out of anchor tag
+      $i->{'link'} =~ m{a\s+href=("|&quot;)?(.*?)("|>|&quot;|&gt;)?}i;
+      if( $2 ){
+	$i->{'link'} = $2;
+      }
+      elsif( $i->{'link'}  =~ m{[\.#/]}i and $rr->{'link'} =~ m{^http://} ){
+	## Smells like a relative url
+	if (substr($i->{'link'}, 0, 1) ne '/') {
+	  $i->{'link'} = '/' . $i->{'link'};
+	}
+	$i->{'link'} = $rr->{'link'} . $i->{'link'};
+      }
+      else {
+	next;
+      }
+    }
+    
+    #If we don't have a title, use the link
+    unless( defined($i->{'title'}) ){
+      $i->{'title'} = $i->{'link'};
+    }
+    
+    if( exists($i->{'link'}) ){
+#XXX      # Fix pre-process munging
+#      $i->{'link'} =~ s/&amp;/&/gi;
+      $i->{'link'} =~ s/ /%20/g;
+    }
+  }
+}
+
+sub parseXML{
+  my($hash, $xml, $tag, $comments) = @_;
+  my($begin, $end, @comments);
+  local $_;
+
+  #Kill comments
+  while( ($begin =  index(${$xml}, '<!--')) > -1 &&
+	${$xml} =~ m%<!--.*?--(>)%sg ){
+    my $str = substr(${$xml}, $begin, pos(${$xml})-$begin, '');
+    
+    #Save them if requested
+    do{ unshift @comments, [$begin, substr($str, 4, length($str)-7)] }
+      if $comments;
+  }
+
+  _parseXML($hash, $xml, $tag);
+
+#  #XXX Context of comment is lost!
+#  #Expose comments if requested
+#  do{ push(@$comments, $_->[1]) for @comments } if ref($comments) eq 'ARRAY';
+  if( $comments ){
+    #Restore comments if requested
+    substr(${$xml}, $_->[0], 0, '<!--'.$_->[1].'-->') for @comments;
+
+    #Expose comments if requested
+    do{ push(@$comments, $_->[1]) for @comments } if ref($comments) eq 'ARRAY';
+  }
+}
+
+sub _parseXML{
+  my($hash, $xml, $tag, $index) = @_;
+  my($begin, $end);
+
+  #Find topTag and set pos to start matching from there
+  ${$xml} =~ /<$tag(?:>|\s)/g;
+  ($begin, $end) = (0, pos(${$xml})||0);
+
+  #Match either <foo></foo> or <bar />, optional attributes, stash tag name
+  while( ${$xml} =~ m%<([^\s>]+)(?:\s+[^>]*?)?(?:/|>.*?</\1)>%sg ){	 
+
+    #Save the tag name, we'll need it
+    $tag = $1 || $2;
+
+    #Save the new beginning and end
+    ($begin, $end) = ($end, pos(${$xml}));
+
+    #Get the bit we just matched.
+    my $str = substr(${$xml}, $begin, $end-$begin);
+    
+    #Extract the actual attributes and contents of the tag
+   $str =~ m%<\Q$tag\E\s*([^>]*?)?>(.*?)</\Q$tag\E>%s ||
+#XXX pointed out by hv
+#    $str =~ s%^.*?<$tag\s*([^>]*?)?>(.*?)</$tag>%<$tag>$2</$tag>%s ||
+      $str =~ m%<\Q$tag\E\s*([^>]*?)?\s*/>%;
+    my($attr, $content) = ($1, $2);
+
+    #Did we get attributes? clean them up and chuck them in a hash.
+    if( $attr ){
+      ($_, $attr) = ($attr, {});
+      $attr->{$1} = $3 while m/([^\s=]+)\s*=\s*(['"])(.*?)\2/g;
+    }
+
+    my $inhash;
+    #Recurse if contents has more tags, replace contents with reference we get
+    if( $content && index($content, '<') > -1 ){
+      _parseXML($inhash={}, \$str, $tag);
+      #Was there any data in the contents? We should extract that...
+      if( $str =~ />[^><]+</ ){
+	#The odd RE above shortcircuits unnecessary entry
+
+	#Clean whitespace between tags
+	#$str =~ s%(?<=>)?\s*(?=<)%%g; #XXX ~same speed, wacko warning
+	#$str =~ s%(>?)\s*<%$1<%g;
+#XXX    #$str =~ s%(?:^|(?<=>))\s*(?:(?=<)|\z)%%g
+
+	my $qr = qr{@{[join('|', keys %{$inhash})]}};
+	$content =~ s%<($qr)\s*(?:[^>]*?)?(?:/|>.*?</\1)>%%sg;
+
+	$inhash->{'<>'} = $content if $content =~ /\S/;
+      }
+    }
+
+    if( ref($inhash) ){
+      #We have attributes? Then we should merge them.
+      if( ref($attr) ){
+	for( keys %{$attr} ){
+	  $inhash->{$_} = exists($inhash->{$_})   ?
+	    (ref($inhash->{$_})  eq 'ARRAY'       ?
+	     [@{$inhash->{$_}}, $attr->{$_}]   :
+	     [  $inhash->{$_},  $attr->{$_}] ) : $attr->{$_};
+	}
+      }
+    }
+    elsif( ref($attr) ){
+      $inhash = $attr;
+    }
+    else{
+      #Otherwise save our content
+      $inhash = $content;
+    }
+    
+    $hash->{$tag} = exists($hash->{$tag}) ?
+      (ref($hash->{$tag})  eq 'ARRAY'     ?
+	[@{$hash->{$tag}}, $inhash]       :
+	[  $hash->{$tag},  $inhash]  )    : $inhash;
+  }
+}
+
+1;
+__END__
+
+=pod
+
+=head1 NAME
+
+XML::RSSLite - lightweight, "relaxed" RSS (and XML-ish) parser
+
+=head1 SYNOPSIS
+
+  use XML::RSSLite;
+
+  . . .
+
+  parseRSS(\%result, \$content);
+
+  print "=== Channel ===\n",
+        "Title: $result{'title'}\n",
+        "Desc:  $result{'description'}\n",
+        "Link:  $result{'link'}\n\n";
+
+  foreach $item (@{$result{'item'}}) {
+  print "  --- Item ---\n",
+        "  Title: $item->{'title'}\n",
+        "  Desc:  $item->{'description'}\n",
+        "  Link:  $item->{'link'}\n\n";
+  }
+
+=head1 DESCRIPTION
+
+This module attempts to extract the maximum amount of content from
+available documents, and is less concerned with XML compliance than
+alternatives. Rather than rely on XML::Parser, it uses heuristics and good
+old-fashioned Perl regular expressions. It stores the data in a simple
+hash structure, and "aliases" certain tags so that when done, you can
+count on having the minimal data necessary for re-constructing a valid
+RSS file. This means you get the basic title, description, and link for a
+channel and its items.
+
+This module extracts more usable links by parsing "scriptingNews" and
+"weblog" formats in addition to RDF & RSS. It also "sanitizes" the
+output for best results. The munging includes:
+
+=over
+
+=item Remove html tags to leave plain text
+
+=item Remove characters other than 0-9~!@#$%^&*()-+=a-zA-Z[];',.:"<>?\s
+
+=item Use <url> tags when <link> is empty
+
+=item Use misplaced urls in <title> when <link> is empty 
+
+=item Exract links from <a href=...> if required   
+
+=item Limit links to ftp and http
+
+=item Join relative urls to the site base
+
+=back
+
+=head2 EXPORT
+
+=over
+
+=item parseRSS($outHashRef, $inScalarRef)
+
+I<$inScalarRef> is a reference to a scalar containing the document to be
+parsed, the contents will effectively be destroyed. I<$outHashRef> is a
+reference to the hash within which to store the parsed content.
+
+=back
+
+=head2 EXPORTABLE
+
+=over
+
+=item parseXML(\%parsedTree, \$parseThis, 'topTag', $comments);
+
+=over
+
+=item parsedTree - required
+
+Reference to hash to store the parsed document within.
+
+=item parseThis  - required
+
+Reference to scalar containing the document to parse.
+
+=item topTag     - optional
+
+Tag to consider the root node, leaving this undefined is not recommended.
+
+=item comments   - optional
+
+=over
+
+=item false will remove contents from parseThis
+
+=item true will not remove comments from parseThis
+
+=item array reference is true, comments are stored here
+
+=back
+
+=back
+
+=head2 CAVEATS
+
+This is not a conforming parser. It does not handle the following
+
+=over
+
+=item
+
+  <foo bar=">">
+
+=item
+
+  <foo><bar> <bar></bar> <bar></bar> </bar></foo>
+
+=item
+
+  <![CDATA[ ]]>
+
+=item
+
+  PI
+
+=back
+
+It's non-validating, without a DTD the following cannot be properly addressed
+
+=over
+
+=item entities
+
+=item namespaces
+
+This might be arriving in the next release.
+
+=back
+
+=back
+
+=head1 SEE ALSO
+
+perl(1), C<XML::RSS>, C<XML::SAX::PurePerl>,
+C<XML::Parser::Lite>, <XML::Parser>
+
+=head1 AUTHOR
+
+Jerrad Pierce <jpierce at cpan.org>.
+
+Scott Thomason <scott at thomasons.org>
+
+=head1 LICENSE
+
+Portions Copyright (c) 2002 Jerrad Pierce, (c) 2000 Scott Thomason.
+All rights reserved. This program is free software; you can redistribute it 
+and/or modify it under the same terms as Perl itself.
+
+=cut

Added: branches/upstream/libxml-rsslite-perl/current/TODO
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/TODO?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/TODO (added)
+++ branches/upstream/libxml-rsslite-perl/current/TODO Thu Nov 15 20:13:54 2007
@@ -1,0 +1,9 @@
+0.10
+	Namespace support
+	Tests for supported types.
+	  Verify compliance with RDF and RSS specificatons
+0.08
+	Fix missing title bug
+	RSS 0.92 compliance
+	Tests for supported types.
+	Check specs for things like RDF proper whose implementation seems to vary

Added: branches/upstream/libxml-rsslite-perl/current/t/01basic.t
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/t/01basic.t?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/t/01basic.t (added)
+++ branches/upstream/libxml-rsslite-perl/current/t/01basic.t Thu Nov 15 20:13:54 2007
@@ -1,0 +1,7 @@
+use XML::RSSLite;
+print "1..2\n";
+
+print "ok 1\n";
+
+print 'not ' unless defined($XML::RSSLite::VERSION);
+print "ok 2\n";

Added: branches/upstream/libxml-rsslite-perl/current/t/02rss.t
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/t/02rss.t?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/t/02rss.t (added)
+++ branches/upstream/libxml-rsslite-perl/current/t/02rss.t Thu Nov 15 20:13:54 2007
@@ -1,0 +1,28 @@
+use XML::RSSLite;
+print "1..2\n";
+
+if( open(RSS, "t/sampleRSS.xml") ){
+  my(%result, $str);
+  $str = do{ local $/; <RSS>};
+  close(RSS);
+  parseRSS(\%result, \$str);
+  print 'not ' unless $result{image}->[1]->{width} == 176;
+  print "ok 1 # $result{image}->[1]->{width} == 176\n";
+}
+else{
+  print "ok 1 #skipped Could not open t/sampleRSS.xml:$!\n";
+}
+
+if( open(RSS, "t/journal.rss") ){
+  my(%result, $str);
+  $str = do{ local $/; <RSS>};
+  close(RSS);
+  parseRSS(\%result, \$str);
+  print 'not ' unless $result{items}->[0]->{title} eq 'gizmo_mathboy (2002.05.03 13:41)';
+  print "ok 2 # '$result{items}->[0]->{title}' eq 'gizmo_mathboy (2002.05.03 13:41)'\n";
+}
+else{
+  print "ok 2 #skipped Could not open t/rss: $!\n";
+}
+
+1;

Added: branches/upstream/libxml-rsslite-perl/current/t/journal.rss
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/t/journal.rss?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/t/journal.rss (added)
+++ branches/upstream/libxml-rsslite-perl/current/t/journal.rss Thu Nov 15 20:13:54 2007
@@ -1,0 +1,157 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<rdf:RDF
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns="http://purl.org/rss/1.0/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
+ xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
+>
+
+<channel rdf:about="http://use.perl.org/journal.pl?op=top">
+<title>use Perl Journals</title>
+<link>http://use.perl.org/journal.pl?op=top</link>
+<description>Top 20 Journals</description>
+<dc:language>en-us</dc:language>
+<dc:rights>use Perl; is Copyright 1997-2002, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners.</dc:rights>
+<dc:date>2002-05-03T19:12:46+00:00</dc:date>
+<dc:publisher>pudge</dc:publisher>
+<dc:creator>pudge at perl.org</dc:creator>
+<dc:subject>Technology</dc:subject>
+<syn:updatePeriod>hourly</syn:updatePeriod>
+<syn:updateFrequency>1</syn:updateFrequency>
+<syn:updateBase>1970-01-01T00:00+00:00</syn:updateBase>
+<items>
+ <rdf:Seq>
+  <rdf:li rdf:resource="http://use.perl.org/~gizmo_mathboy/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~pudge/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~cwest/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~2shortplanks/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~mako132/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~geoff/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~ziggy/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~chaoticset/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~Elian/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~jjohn/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~KM/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~mothra/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~davorg/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~rafael/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~Simon/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~TorgoX/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~chromatic/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~tinman/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~vek/journal/" />
+  <rdf:li rdf:resource="http://use.perl.org/~acme/journal/" />
+ </rdf:Seq>
+</items>
+<image rdf:resource="http://use.perl.org/images/topics/useperl.gif" />
+</channel>
+
+<image rdf:about="http://use.perl.org/images/topics/useperl.gif">
+<title>use Perl Journals</title>
+<url>http://use.perl.org/images/topics/useperl.gif</url>
+<link>http://use.perl.org/journal.pl?op=top</link>
+</image>
+
+<item rdf:about="http://use.perl.org/~gizmo_mathboy/journal/">
+<title>gizmo_mathboy (2002.05.03 13:41)</title>
+<link>http://use.perl.org/~gizmo_mathboy/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~pudge/journal/">
+<title>pudge (2002.05.03 13:06)</title>
+<link>http://use.perl.org/~pudge/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~cwest/journal/">
+<title>cwest (2002.05.03 12:06)</title>
+<link>http://use.perl.org/~cwest/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~2shortplanks/journal/">
+<title>2shortplanks (2002.05.03 11:49)</title>
+<link>http://use.perl.org/~2shortplanks/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~mako132/journal/">
+<title>mako132 (2002.05.03 11:28)</title>
+<link>http://use.perl.org/~mako132/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~geoff/journal/">
+<title>geoff (2002.05.03 11:25)</title>
+<link>http://use.perl.org/~geoff/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~ziggy/journal/">
+<title>ziggy (2002.05.03 10:43)</title>
+<link>http://use.perl.org/~ziggy/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~chaoticset/journal/">
+<title>chaoticset (2002.05.03 10:34)</title>
+<link>http://use.perl.org/~chaoticset/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~Elian/journal/">
+<title>Elian (2002.05.03 10:30)</title>
+<link>http://use.perl.org/~Elian/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~jjohn/journal/">
+<title>jjohn (2002.05.03  9:43)</title>
+<link>http://use.perl.org/~jjohn/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~KM/journal/">
+<title>KM (2002.05.03  9:27)</title>
+<link>http://use.perl.org/~KM/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~mothra/journal/">
+<title>mothra (2002.05.03  8:52)</title>
+<link>http://use.perl.org/~mothra/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~davorg/journal/">
+<title>davorg (2002.05.03  7:40)</title>
+<link>http://use.perl.org/~davorg/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~rafael/journal/">
+<title>rafael (2002.05.03  5:46)</title>
+<link>http://use.perl.org/~rafael/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~Simon/journal/">
+<title>Simon (2002.05.03  5:36)</title>
+<link>http://use.perl.org/~Simon/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~TorgoX/journal/">
+<title>TorgoX (2002.05.03  2:11)</title>
+<link>http://use.perl.org/~TorgoX/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~chromatic/journal/">
+<title>chromatic (2002.05.03  0:49)</title>
+<link>http://use.perl.org/~chromatic/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~tinman/journal/">
+<title>tinman (2002.05.03  0:21)</title>
+<link>http://use.perl.org/~tinman/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~vek/journal/">
+<title>vek (2002.05.02 19:16)</title>
+<link>http://use.perl.org/~vek/journal/</link>
+</item>
+
+<item rdf:about="http://use.perl.org/~acme/journal/">
+<title>acme (2002.05.02 11:48)</title>
+<link>http://use.perl.org/~acme/journal/</link>
+</item>
+
+</rdf:RDF>

Added: branches/upstream/libxml-rsslite-perl/current/t/sampleRSS.xml
URL: http://svn.debian.org/wsvn/branches/upstream/libxml-rsslite-perl/current/t/sampleRSS.xml?rev=9361&op=file
==============================================================================
--- branches/upstream/libxml-rsslite-perl/current/t/sampleRSS.xml (added)
+++ branches/upstream/libxml-rsslite-perl/current/t/sampleRSS.xml Thu Nov 15 20:13:54 2007
@@ -1,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<rss version="0.91">
+	<channel>
+		<title>WriteTheWeb</title> 
+		<link>http://writetheweb.com</link> 
+		<description>News for web users that write back</description> 
+		<language>en-us</language> 
+		<copyright>Copyright 2000, WriteTheWeb team.</copyright> 
+		<managingEditor>editor at writetheweb.com</managingEditor> 
+		<webMaster>webmaster at writetheweb.com</webMaster> 
+		<image>
+			<title>WriteTheWeb</title> 
+			<url>http://writetheweb.com/images/mynetscape88.gif</url> 
+			<link>http://writetheweb.com</link> 
+			<width>88</width> 
+			<height>31</height> 
+			<description>News for web users that write back</description> 
+			</image>
+		<image>
+			<title>WriteTheWeb</title> 
+			<url>http://writetheweb.com/images/mynetscape88.gif</url> 
+			<link>http://writetheweb.com</link> 
+			<width>176</width> 
+			<height>62</height> 
+			<description>News for web users that write back</description> 
+			</image>
+
+		<item>
+			<title>Giving the world a pluggable Gnutella</title> 
+			<link>http://writetheweb.com/read.php?item=24</link> 
+			<description>WorldOS is a framework on which to build programs that work like Freenet or Gnutella -allowing distributed applications using peer-to-peer routing.</description> 
+			</item>
+		<item>
+			<title>Syndication discussions hot up</title> 
+			<link>http://writetheweb.com/read.php?item=23</link> 
+			<description>After a period of dormancy, the Syndication mailing list has become active again, with contributions from leaders in traditional media and Web syndication.</description> 
+			</item>
+		<item>
+			<title>Personal web server integrates file sharing and messaging</title> 
+			<link>http://writetheweb.com/read.php?item=22</link> 
+			<description>The Magi Project is an innovative project to create a combined personal web server and messaging system that enables the sharing and synchronization of information across desktop, laptop and palmtop devices.</description> 
+			</item>
+		<item>
+			<title>Syndication and Metadata</title> 
+			<link>http://writetheweb.com/read.php?item=21</link> 
+			<description>RSS is probably the best known metadata format around. RDF is probably one of the least understood. In this essay, published on my O'Reilly Network weblog, I argue that the next generation of RSS should be based on RDF.</description> 
+			</item>
+		<item>
+			<title>UK bloggers get organised</title> 
+			<link>http://writetheweb.com/read.php?item=20</link> 
+			<description>Looks like the weblogs scene is gathering pace beyond the shores of the US. There's now a UK-specific page on weblogs.com, and a mailing list at egroups.</description> 
+			</item>
+		<item>
+			<title>Yournamehere.com more important than anything</title> 
+			<link>http://writetheweb.com/read.php?item=19</link> 
+			<description>Whatever you're publishing on the web, your site name is the most valuable asset you have, according to Carl Steadman.</description> 
+			</item>
+		</channel>
+	</rss>




More information about the Pkg-perl-cvs-commits mailing list