set pages 80
set lines 132
set long 10000
set define off
set echo on

--conn rss/rss

-- Insert a news item using the RSS 2.0 format
insert into newsItemsTable 
values(XMLType('<item><title>Here is a test item</title><link>http://www.oracle.com</link><description>This is the first test item</description>
<pubDate>Wed, 25 Apr 2007 12:56:26 GMT</pubDate></item>'))
/

commit
/

-- Insert a news item with a duplicate title but using the ATOM format 
insert into newsItemsTable
values(XMLType('<a:entry xmlns:a="http://purl.org/atom/ns#"><a:title>Here is a test item</a:title><a:link rel="alternate" type="text/html" href="http://www.oracle.com"/>
<a:issued>2007-05-07T21:04:40+00:00</a:issued><a:content>This is the duplicate test item</a:content></a:entry>'))
/

-- Insert a news item with a duplicate title but using the RSS 1.0 format 
insert into newsItemsTable
values(XMLType('<item xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/"><title>Here is a test item</title><link>http://www.oracle.com</link>
<dc:date>2007-05-07T21:04:40+00:00</dc:date><description>This is another duplicate test item</description></item>'))
/

select count(*) from newsItemsTable
/
