<?xml version="1.0"?>

<st-source>
<!-- 
Name: SeasideRSRSS
Notice: All rights reserved
BundleName: SeasideRSRSS
Comment: RSRSS for Seaside in VisualWorks

RSRSS - Really Simple RSS

Contributors : Philippe Marschall

Keywords: Web, Continuations,  HTML, XML, RSS, Internet, Squeak

Port from RSRSS-mb.29.mcz      24 July 2007 6:10:08 pm

DevelopmentPrerequisites: #(#(#any 'SeasideBase' ''))
Parcel: #('SeasideRSRSS')
ParcelName: SeasideRSRSS
PrerequisiteParcels: #(#('SeasideBase' ''))
Version: 1.29
Date: 6:22:21 pm July 24, 2007
 -->
<time-stamp>From VisualWorks®, 7.5 of April 16, 2007 on July 24, 2007 at 6:22:21 pm</time-stamp>


<do-it>(Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned.  Choose terminate or close.']</do-it>

<class>
<name>RRChange</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>timestamp author title description changedClass changedSelector sourceCode </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Demo</category>
<attributes>
<package>RSRSS-Demo</package>
</attributes>
</class>

<class>
<name>RRCategoryTag</name>
<environment>Seaside</environment>
<super>Seaside.WATagBrush</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Tags</category>
<attributes>
<package>RSRSS-Tags</package>
</attributes>
</class>

<class>
<name>RRRssRender</name>
<environment>Seaside</environment>
<super>Seaside.WARender</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Core</category>
<attributes>
<package>RSRSS-Core</package>
</attributes>
</class>

<class>
<name>RRStylesTwo</name>
<environment>Seaside</environment>
<super>Seaside.WAStyleLibrary</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Demo</category>
<attributes>
<package>RSRSS-Demo</package>
</attributes>
</class>

<class>
<name>RRGuidTag</name>
<environment>Seaside</environment>
<super>Seaside.WATagBrush</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Tags</category>
<attributes>
<package>RSRSS-Tags</package>
</attributes>
</class>

<class>
<name>RREmailAddress</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>username address </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Model</category>
<attributes>
<package>RSRSS-Model</package>
</attributes>
</class>

<class>
<name>RRComponent</name>
<environment>Seaside</environment>
<super>Seaside.WAComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Core</category>
<attributes>
<package>RSRSS-Core</package>
</attributes>
</class>

<class>
<name>RRRssRenderLoopMain</name>
<environment>Seaside</environment>
<super>Seaside.WARenderLoopMain</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Core</category>
<attributes>
<package>RSRSS-Core</package>
</attributes>
</class>

<class>
<name>RRLanguageTag</name>
<environment>Seaside</environment>
<super>Seaside.WATagBrush</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Tags</category>
<attributes>
<package>RSRSS-Tags</package>
</attributes>
</class>

<class>
<name>RRChangesDemo</name>
<environment>Seaside</environment>
<super>Seaside.RRComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Demo</category>
<attributes>
<package>RSRSS-Demo</package>
</attributes>
</class>

<class>
<name>RRRssStreamDocument</name>
<environment>Seaside</environment>
<super>Seaside.WAHtmlStreamDocument</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Core</category>
<attributes>
<package>RSRSS-Core</package>
</attributes>
</class>

<class>
<name>RRStylesOne</name>
<environment>Seaside</environment>
<super>Seaside.WAStyleLibrary</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Demo</category>
<attributes>
<package>RSRSS-Demo</package>
</attributes>
</class>

<class>
<name>RRDayTag</name>
<environment>Seaside</environment>
<super>Seaside.WATagBrush</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Tags</category>
<attributes>
<package>RSRSS-Tags</package>
</attributes>
</class>

<class>
<name>RRRssSession</name>
<environment>Seaside</environment>
<super>Seaside.WASession</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Core</category>
<attributes>
<package>RSRSS-Core</package>
</attributes>
</class>

<class>
<name>RRRssRoot</name>
<environment>Seaside</environment>
<super>Seaside.WAHtmlRoot</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Core</category>
<attributes>
<package>RSRSS-Core</package>
</attributes>
</class>

<class>
<name>RRSourceTag</name>
<environment>Seaside</environment>
<super>Seaside.WATagBrush</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Tags</category>
<attributes>
<package>RSRSS-Tags</package>
</attributes>
</class>

<class>
<name>RRRfc822DateTime</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>dateAndTime timezoneString </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Model</category>
<attributes>
<package>RSRSS-Model</package>
</attributes>
</class>

<class>
<name>RRStylesThree</name>
<environment>Seaside</environment>
<super>Seaside.WAStyleLibrary</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Demo</category>
<attributes>
<package>RSRSS-Demo</package>
</attributes>
</class>

<class>
<name>RRDemo</name>
<environment>Seaside</environment>
<super>Seaside.RRComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Demo</category>
<attributes>
<package>RSRSS-Demo</package>
</attributes>
</class>

<class>
<name>RRCloudTag</name>
<environment>Seaside</environment>
<super>Seaside.WATagBrush</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Tags</category>
<attributes>
<package>RSRSS-Tags</package>
</attributes>
</class>

<comment>
<class-id>Seaside.RRCloudTag</class-id>
<body>&lt;cloud&gt; is an optional sub-element of &lt;channel&gt;.

It specifies a web service that supports the rssCloud interface which can be implemented in HTTP-POST, XML-RPC or SOAP 1.1.

Its purpose is to allow processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds. 

A full explanation of this element and the rssCloud interface is here:
http://www.rssboard.org/rsscloud-interface</body>
</comment>

<class>
<name>RRRssRenderCanvas</name>
<environment>Seaside</environment>
<super>Seaside.WACanvas</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>context callbacks </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Core</category>
<attributes>
<package>RSRSS-Core</package>
</attributes>
</class>

<comment>
<class-id>Seaside.RRRssRenderCanvas</class-id>
<body>Structure of an RSS Document
Elements with a star (*) at the beginning are required. Channel is automatically open.

channel
	*title
	*link
	*description
	language
	copyright
	managingEditor
	webMaster
	publicationDate
	lastBuildDate
	category
	generator
	documentation
	cloud
	timeToLive
	image
		*url
		*title
		*link
		width
		height
		description
	rating
	textInput
		*title
		*description
		*name
		*link
	skipHours
		hour
	skipDays
		day
	item
		*title
		*link
		*description
		author
		category
		comments
		enclosure
		guid
		publicationDate
		source
		
Email Addresses:
Email addresses must conform to RFC 2822
Convert the email address to a valid form. Examples of valid email addresses:
    * joesmith@example.com
    * joesmith@example.com (Joe Smith)
    * Joe Smith &lt;joesmith@example.com&gt;
    * joesmith.nospamplease@nospam.example.com
You can either:
- use correctly formatted strings
- implement #displayString in your domain email address class so that it return a string in a valid form
- implement #renderOn: in your domain  email address class so that it renders a string in a valid form
- use RREmailAddress

date times:
The value specified must meet the Date and Time specifications as defined by RFC822, with the exception that the year should be expressed as four digits.
Here are examples of valid RFC822 date-times:
Wed, 02 Oct 2002 08:00:00 EST
Wed, 02 Oct 2002 13:00:00 GMT
Wed, 02 Oct 2002 15:00:00 +0200

If you use Chronos you can use
printStringUsing: printStringUsing: ChronosPrintPolicy rfc822
Else you can use RRRfc822DateTime.

Here is an example of an invalid RFC822 date-time:
2002-10-02T08:00:00-05:00
</body>
</comment>

<class>
<name>RREnclosureTag</name>
<environment>Seaside</environment>
<super>Seaside.WATagBrush</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Tags</category>
<attributes>
<package>RSRSS-Tags</package>
</attributes>
</class>

<class>
<name>RRRssRenderLoop</name>
<environment>Seaside</environment>
<super>Seaside.WARenderLoop</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>RSRSS-Core</category>
<attributes>
<package>RSRSS-Core</package>
</attributes>
</class>

<methods>
<class-id>Seaside.RRChange</class-id> <category>accessing</category>

<body package="RSRSS-Demo" selector="author">author
	^author</body>

<body package="RSRSS-Demo" selector="author:">author: anObject
	author := anObject</body>

<body package="RSRSS-Demo" selector="changedClass">changedClass
	^ changedClass</body>

<body package="RSRSS-Demo" selector="changedClass:">changedClass: anObject
	changedClass := anObject</body>

<body package="RSRSS-Demo" selector="changedSelector">changedSelector
	^ changedSelector</body>

<body package="RSRSS-Demo" selector="changedSelector:">changedSelector: aSymbol
	changedSelector := aSymbol</body>

<body package="RSRSS-Demo" selector="description">description
	^description ifNil: [ self sourceCode ].</body>

<body package="RSRSS-Demo" selector="description:">description: aString
	description := aString</body>

<body package="RSRSS-Demo" selector="sourceCode">sourceCode
	^sourceCode</body>

<body package="RSRSS-Demo" selector="sourceCode:">sourceCode: aString
	sourceCode := aString</body>

<body package="RSRSS-Demo" selector="timestamp">timestamp
	^timestamp</body>

<body package="RSRSS-Demo" selector="timestamp:">timestamp: aTimestamp
	timestamp := aTimestamp</body>

<body package="RSRSS-Demo" selector="title">title
	^title</body>

<body package="RSRSS-Demo" selector="title:">title: aString
	title := aString</body>
</methods>

<methods>
<class-id>Seaside.RRChange</class-id> <category>api</category>

<body package="RSRSS-Demo" selector="addParametersTo:">addParametersTo: anUrl
	self hasChangedClass ifFalse: [^self].
	anUrl addParameter: 'class' value: self changedClassName.
	self hasChangedSelector ifTrue: [
		anUrl addParameter: 'method' value: self changedSelector ].
	self isMeta ifTrue: [
		anUrl addParameter: 'meta']
</body>

<body package="RSRSS-Demo" selector="changedClassName">changedClassName
	self hasChangedClass ifFalse: [^nil].
	^ self changedClass theNonMetaClass fullName</body>

<body package="RSRSS-Demo" selector="sourceCodeLimitedTo:">sourceCodeLimitedTo: max
	self sourceCode ifNil: [ ^String new ].
	^self sourceCode copyFrom: 1 to: (max min: self sourceCode size)</body>
</methods>

<methods>
<class-id>Seaside.RRChange</class-id> <category>testing</category>

<body package="RSRSS-Demo" selector="hasChangedClass">hasChangedClass
	"Some VW changes are not about any specific class"
	^self changedClass notNil</body>

<body package="RSRSS-Demo" selector="hasChangedSelector">hasChangedSelector
	^self changedSelector notNil</body>

<body package="RSRSS-Demo" selector="isMeta">isMeta
	^self changedClass isMeta</body>
</methods>

<methods>
<class-id>Seaside.RRCategoryTag</class-id> <category>accessing</category>

<body package="RSRSS-Tags" selector="tag">tag
	^'category'</body>
</methods>

<methods>
<class-id>Seaside.RRCategoryTag</class-id> <category>attributes</category>

<body package="RSRSS-Tags" selector="category:">category: aString
	self attributeAt: 'category' put: aString</body>
</methods>

<methods>
<class-id>Seaside.RRRssRender</class-id> <category>rendering</category>

<body package="RSRSS-Core" selector="buildDocRoot">buildDocRoot
	| docRoot |
	docRoot := RRRssRoot new.
	docRoot resourceBaseUrl: self application resourceBaseUrl.
  	self session updateRoot: docRoot.
	root visiblePresentersDo: [:each | each updateRoot: docRoot].
	^ docRoot</body>

<body package="RSRSS-Core" selector="writeOnLoadOn:">writeOnLoadOn: anHtmlDocument</body>
</methods>

<methods>
<class-id>Seaside.RRStylesTwo</class-id> <category>css</category>

<body package="RSRSS-Demo" selector="style">style
	^'
channel link, channel language, channel copyright, channel managingEditor, channel webMaster, channel docs, channel lastBuildDate {
	    display:none;
}
rss {
 	    font-family:Verdana, Arial, Helvetica, sans-serif;
 	    font-size:0.7em;
 	    line-height:130%;
 	    margin:1em;
 }
/* HEADER */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
channel title {
 	    display:block;
 	    padding:0.4em 0.2em;
 	    color:#FFF;
 	    border-bottom:1px solid black;
 	    font-weight:bold;
 	    font-size:140%;
 	    background-color:#4483C7;
}
channel description {
 	    display:block;
 	    float:left;
 	    font-size:130%;
 	    font-weight:bold;
 	    margin:0.5em;
}
/* CONTENT */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
channel item {
 	    background-color:#FFFFEE;
 	    border:1px solid #538620;
 	    clear:both;
 	    display:block;
 	    padding:0 0 0.5em;
 	    margin:1em;
}
channel item title {
 	    background-color:#538620;
 	    border-bottom-width:0;
 	    color:#FFF;
 	    display:block;
 	    font-size:110%;
 	    font-weight:bold;
 	    margin:0;
 	    padding:0.3em 0.5em;
}
channel item description {
 	    display: block;
 	    float:none;
 	    margin:0;
 	    text-align: left;
 	    padding:0.2em 0.5em 0.4em;
 	    color: black;
 	    font-size:100%;
 	    font-weight:normal;
}
channel item link {
 	    color:#666;
 	    display:block;
 	    font-size:86%;
 	    padding:0 0.5em;
}
channel item pubDate {
 	    color:#666;
 	    display:block;
 	    font-size:86%;
	    padding:0 0.5em;
}
'</body>

<body package="RSRSS-Demo" selector="style2">style2
	^'
channel link, channel language, channel copyright, channel managingEditor, channel webMaster, channel docs, channel lastBuildDate {
	    display:none;
}
rss {
 	    font-family:Verdana, Arial, Helvetica, sans-serif;
 	    font-size:0.7em;
 	    line-height:130%;
 	    margin:1em;
 }
/* HEADER */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
channel title {
 	    display:block;
 	    padding:0.4em 0.2em;
 	    color:#FFF;
 	    border-bottom:1px solid black;
 	    font-weight:bold;
 	    font-size:140%;
 	    background-color:#4483C7;
}
channel description {
 	    display:block;
 	    float:left;
 	    font-size:130%;
 	    font-weight:bold;
 	    margin:0.5em;
}
/* CONTENT */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
channel item {
 	    background-color:#FFFFEE;
 	    border:1px solid #538620;
 	    clear:both;
 	    display:block;
 	    padding:0 0 0.5em;
 	    margin:1em;
}
channel item title {
 	    background-color:#538620;
 	    border-bottom-width:0;
 	    color:#FFF;
 	    display:block;
 	    font-size:110%;
 	    font-weight:bold;
 	    margin:0;
 	    padding:0.3em 0.5em;
}
channel item description {
 	    display: block;
 	    float:none;
 	    margin:0;
 	    text-align: left;
 	    padding:0.2em 0.5em 0.4em;
 	    color: black;
 	    font-size:100%;
 	    font-weight:normal;
}
channel item link {
 	    color:#666;
 	    display:block;
 	    font-size:86%;
 	    padding:0 0.5em;
}
channel item pubDate {
 	    color:#666;
 	    display:block;
 	    font-size:86%;
	    padding:0 0.5em;
}
'</body>
</methods>

<methods>
<class-id>Seaside.RRGuidTag</class-id> <category>attributes</category>

<body package="RSRSS-Tags" selector="beNoPermaLink">beNoPermaLink
	self isPermaLink: false</body>

<body package="RSRSS-Tags" selector="bePermaLink">bePermaLink
	self isPermaLink: true</body>

<body package="RSRSS-Tags" selector="isPermaLink:">isPermaLink: aBoolean
	"the value really must be a string else seaside makes
	isPermaLink='isPermaLink'"
	self attributeAt: 'isPermaLink' put: aBoolean displayString</body>
</methods>

<methods>
<class-id>Seaside.RRGuidTag</class-id> <category>accessing</category>

<body package="RSRSS-Tags" selector="tag">tag
	^'guid'</body>
</methods>

<methods>
<class-id>Seaside.RREmailAddress</class-id> <category>printing</category>

<body package="RSRSS-Model" selector="printOn:">printOn: aStream
	super printOn: aStream.
	aStream nextPut: $(.
	aStream nextPutAll: self displayString.
	aStream nextPut: $)</body>
</methods>

<methods>
<class-id>Seaside.RREmailAddress</class-id> <category>accessing</category>

<body package="RSRSS-Model" selector="address">address
	^address</body>

<body package="RSRSS-Model" selector="address:">address: anObject
	address := anObject</body>

<body package="RSRSS-Model" selector="username">username
	^username</body>

<body package="RSRSS-Model" selector="username:">username: anObject
	username := anObject</body>
</methods>

<methods>
<class-id>Seaside.RREmailAddress</class-id> <category>displaying</category>

<body package="RSRSS-Model" selector="displayString">displayString
	^String streamContents: [ :stream |
		username isNil ifFalse: [
			stream
				nextPutAll: username;
				nextPutAll: ' &lt;'].
		stream nextPutAll: address.
		username isNil ifFalse: [
			stream nextPut: $&gt; ] ]</body>
</methods>

<methods>
<class-id>Seaside.RREmailAddress class</class-id> <category>instance creation</category>

<body package="RSRSS-Model" selector="address:">address: aString
	^self new
		address: aString;
		yourself</body>

<body package="RSRSS-Model" selector="address:username:">address: anAddressString username: aUsernameString
	^self new
		address: anAddressString;
		username: aUsernameString;
		yourself</body>
</methods>

<methods>
<class-id>Seaside.RRComponent</class-id> <category>rendering</category>

<body package="RSRSS-Core" selector="rendererClass">rendererClass
	^RRRssRenderCanvas</body>
</methods>

<methods>
<class-id>Seaside.RRComponent class</class-id> <category>testing</category>

<body package="RSRSS-Core" selector="isFeed">isFeed
	^true</body>
</methods>

<methods>
<class-id>Seaside.RRComponent class</class-id> <category>initialization</category>

<body package="RSRSS-Core" selector="registerAsApplication:">registerAsApplication: aString
	^(super registerAsApplication: aString)
		preferenceAt: #sessionClass put: RRRssSession;
		preferenceAt: #mainClass put: RRRssRenderLoopMain;
		yourself</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderLoopMain</class-id> <category>decorations</category>

<body package="RSRSS-Core" selector="call:">call: aComponent
	^ RRRssRenderLoop new call: aComponent</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderLoopMain</class-id> <category>accessing</category>

<body package="RSRSS-Core" selector="start:">start: aRequest
	| root |
	root := self createRoot.
	root visiblePresentersDo: [ :each |
		each initialRequest: aRequest].
	(RRRssRenderLoop new root: root) run</body>
</methods>

<methods>
<class-id>Seaside.RRLanguageTag</class-id> <category>languages-generated</category>

<body package="RSRSS-Tags" selector="afrikaans">afrikaans
	self with: 'af'</body>

<body package="RSRSS-Tags" selector="albanian">albanian
	self with: 'sq'</body>

<body package="RSRSS-Tags" selector="basque">basque
	self with: 'eu'</body>

<body package="RSRSS-Tags" selector="belarusian">belarusian
	self with: 'be'</body>

<body package="RSRSS-Tags" selector="bulgarian">bulgarian
	self with: 'bg'</body>

<body package="RSRSS-Tags" selector="catalan">catalan
	self with: 'ca'</body>

<body package="RSRSS-Tags" selector="chineseSimplified">chineseSimplified
	self with: 'zh-cn'</body>

<body package="RSRSS-Tags" selector="chineseTraditional">chineseTraditional
	self with: 'zh-tw'</body>

<body package="RSRSS-Tags" selector="croatian">croatian
	self with: 'hr'</body>

<body package="RSRSS-Tags" selector="czech">czech
	self with: 'cs'</body>

<body package="RSRSS-Tags" selector="danish">danish
	self with: 'da'</body>

<body package="RSRSS-Tags" selector="dutch">dutch
	self with: 'nl'</body>

<body package="RSRSS-Tags" selector="dutchBelgium">dutchBelgium
	self with: 'nl-be'</body>

<body package="RSRSS-Tags" selector="dutchNetherlands">dutchNetherlands
	self with: 'nl-nl'</body>

<body package="RSRSS-Tags" selector="english">english
	self with: 'en'</body>

<body package="RSRSS-Tags" selector="englishAustralia">englishAustralia
	self with: 'en-au'</body>

<body package="RSRSS-Tags" selector="englishBelize">englishBelize
	self with: 'en-bz'</body>

<body package="RSRSS-Tags" selector="englishCanada">englishCanada
	self with: 'en-ca'</body>

<body package="RSRSS-Tags" selector="englishIreland">englishIreland
	self with: 'en-ie'</body>

<body package="RSRSS-Tags" selector="englishJamaica">englishJamaica
	self with: 'en-jm'</body>

<body package="RSRSS-Tags" selector="englishNewZealand">englishNewZealand
	self with: 'en-nz'</body>

<body package="RSRSS-Tags" selector="englishPhillipines">englishPhillipines
	self with: 'en-ph'</body>

<body package="RSRSS-Tags" selector="englishSouthAfrica">englishSouthAfrica
	self with: 'en-za'</body>

<body package="RSRSS-Tags" selector="englishTrinidad">englishTrinidad
	self with: 'en-tt'</body>

<body package="RSRSS-Tags" selector="englishUnitedKingdom">englishUnitedKingdom
	self with: 'en-gb'</body>

<body package="RSRSS-Tags" selector="englishUnitedStates">englishUnitedStates
	self with: 'en-us'</body>

<body package="RSRSS-Tags" selector="englishZimbabwe">englishZimbabwe
	self with: 'en-zw'</body>

<body package="RSRSS-Tags" selector="estonian">estonian
	self with: 'et'</body>

<body package="RSRSS-Tags" selector="faeroese">faeroese
	self with: 'fo'</body>

<body package="RSRSS-Tags" selector="finnish">finnish
	self with: 'fi'</body>

<body package="RSRSS-Tags" selector="french">french
	self with: 'fr'</body>

<body package="RSRSS-Tags" selector="frenchBelgium">frenchBelgium
	self with: 'fr-be'</body>

<body package="RSRSS-Tags" selector="frenchCanada">frenchCanada
	self with: 'fr-ca'</body>

<body package="RSRSS-Tags" selector="frenchFrance">frenchFrance
	self with: 'fr-fr'</body>

<body package="RSRSS-Tags" selector="frenchLuxembourg">frenchLuxembourg
	self with: 'fr-lu'</body>

<body package="RSRSS-Tags" selector="frenchMonaco">frenchMonaco
	self with: 'fr-mc'</body>

<body package="RSRSS-Tags" selector="frenchSwitzerland">frenchSwitzerland
	self with: 'fr-ch'</body>

<body package="RSRSS-Tags" selector="gaelic">gaelic
	self with: 'gd'</body>

<body package="RSRSS-Tags" selector="galician">galician
	self with: 'gl'</body>

<body package="RSRSS-Tags" selector="german">german
	self with: 'de'</body>

<body package="RSRSS-Tags" selector="germanAustria">germanAustria
	self with: 'de-at'</body>

<body package="RSRSS-Tags" selector="germanGermany">germanGermany
	self with: 'de-de'</body>

<body package="RSRSS-Tags" selector="germanLiechtenstein">germanLiechtenstein
	self with: 'de-li'</body>

<body package="RSRSS-Tags" selector="germanLuxembourg">germanLuxembourg
	self with: 'de-lu'</body>

<body package="RSRSS-Tags" selector="germanSwitzerland">germanSwitzerland
	self with: 'de-ch'</body>

<body package="RSRSS-Tags" selector="greek">greek
	self with: 'el'</body>

<body package="RSRSS-Tags" selector="hawaiian">hawaiian
	self with: 'haw'</body>

<body package="RSRSS-Tags" selector="hungarian">hungarian
	self with: 'hu'</body>

<body package="RSRSS-Tags" selector="icelandic">icelandic
	self with: 'is'</body>

<body package="RSRSS-Tags" selector="indonesian">indonesian
	self with: 'in'</body>

<body package="RSRSS-Tags" selector="irish">irish
	self with: 'ga'</body>

<body package="RSRSS-Tags" selector="italian">italian
	self with: 'it'</body>

<body package="RSRSS-Tags" selector="italianItaly">italianItaly
	self with: 'it-it'</body>

<body package="RSRSS-Tags" selector="italianSwitzerland">italianSwitzerland
	self with: 'it-ch'</body>

<body package="RSRSS-Tags" selector="japanese">japanese
	self with: 'ja'</body>

<body package="RSRSS-Tags" selector="korean">korean
	self with: 'ko'</body>

<body package="RSRSS-Tags" selector="macedonian">macedonian
	self with: 'mk'</body>

<body package="RSRSS-Tags" selector="norwegian">norwegian
	self with: 'no'</body>

<body package="RSRSS-Tags" selector="polish">polish
	self with: 'pl'</body>

<body package="RSRSS-Tags" selector="portuguese">portuguese
	self with: 'pt'</body>

<body package="RSRSS-Tags" selector="portugueseBrazil">portugueseBrazil
	self with: 'pt-br'</body>

<body package="RSRSS-Tags" selector="portuguesePortugal">portuguesePortugal
	self with: 'pt-pt'</body>

<body package="RSRSS-Tags" selector="romanian">romanian
	self with: 'ro'</body>

<body package="RSRSS-Tags" selector="romanianMoldova">romanianMoldova
	self with: 'ro-mo'</body>

<body package="RSRSS-Tags" selector="romanianRomania">romanianRomania
	self with: 'ro-ro'</body>

<body package="RSRSS-Tags" selector="russian">russian
	self with: 'ru'</body>

<body package="RSRSS-Tags" selector="russianMoldova">russianMoldova
	self with: 'ru-mo'</body>

<body package="RSRSS-Tags" selector="russianRussia">russianRussia
	self with: 'ru-ru'</body>

<body package="RSRSS-Tags" selector="serbian">serbian
	self with: 'sr'</body>

<body package="RSRSS-Tags" selector="slovak">slovak
	self with: 'sk'</body>

<body package="RSRSS-Tags" selector="slovenian">slovenian
	self with: 'sl'</body>

<body package="RSRSS-Tags" selector="spanish">spanish
	self with: 'es'</body>

<body package="RSRSS-Tags" selector="spanishArgentina">spanishArgentina
	self with: 'es-ar'</body>

<body package="RSRSS-Tags" selector="spanishBolivia">spanishBolivia
	self with: 'es-bo'</body>

<body package="RSRSS-Tags" selector="spanishChile">spanishChile
	self with: 'es-cl'</body>

<body package="RSRSS-Tags" selector="spanishColombia">spanishColombia
	self with: 'es-co'</body>

<body package="RSRSS-Tags" selector="spanishCostaRica">spanishCostaRica
	self with: 'es-cr'</body>

<body package="RSRSS-Tags" selector="spanishDominicanRepublic">spanishDominicanRepublic
	self with: 'es-do'</body>

<body package="RSRSS-Tags" selector="spanishEcuador">spanishEcuador
	self with: 'es-ec'</body>

<body package="RSRSS-Tags" selector="spanishElSalvador">spanishElSalvador
	self with: 'es-sv'</body>

<body package="RSRSS-Tags" selector="spanishGuatemala">spanishGuatemala
	self with: 'es-gt'</body>

<body package="RSRSS-Tags" selector="spanishHonduras">spanishHonduras
	self with: 'es-hn'</body>

<body package="RSRSS-Tags" selector="spanishMexico">spanishMexico
	self with: 'es-mx'</body>

<body package="RSRSS-Tags" selector="spanishNicaragua">spanishNicaragua
	self with: 'es-ni'</body>

<body package="RSRSS-Tags" selector="spanishPanama">spanishPanama
	self with: 'es-pa'</body>

<body package="RSRSS-Tags" selector="spanishParaguay">spanishParaguay
	self with: 'es-py'</body>

<body package="RSRSS-Tags" selector="spanishPeru">spanishPeru
	self with: 'es-pe'</body>

<body package="RSRSS-Tags" selector="spanishPuertoRico">spanishPuertoRico
	self with: 'es-pr'</body>

<body package="RSRSS-Tags" selector="spanishSpain">spanishSpain
	self with: 'es-es'</body>

<body package="RSRSS-Tags" selector="spanishUruguay">spanishUruguay
	self with: 'es-uy'</body>

<body package="RSRSS-Tags" selector="spanishVenezuela">spanishVenezuela
	self with: 'es-ve'</body>

<body package="RSRSS-Tags" selector="swedish">swedish
	self with: 'sv'</body>

<body package="RSRSS-Tags" selector="swedishFinland">swedishFinland
	self with: 'sv-fi'</body>

<body package="RSRSS-Tags" selector="swedishSweden">swedishSweden
	self with: 'sv-se'</body>

<body package="RSRSS-Tags" selector="turkish">turkish
	self with: 'tr'</body>

<body package="RSRSS-Tags" selector="ukranian">ukranian
	self with: 'uk'</body>
</methods>

<methods>
<class-id>Seaside.RRLanguageTag</class-id> <category>accessing</category>

<body package="RSRSS-Tags" selector="tag">tag
	^'language'</body>
</methods>

<methods>
<class-id>Seaside.RRLanguageTag class</class-id> <category>accessing</category>

<body package="RSRSS-Tags" selector="codes">codes
	^Array streamContents: [ :stream |
		self codesString lines do: [ :line |
			stream nextPut: (Array
				with: (line copyUpTo: Character tab) asLegalSelector
				with: (line copyAfter: Character tab)) ] ]</body>

<body package="RSRSS-Tags" selector="codesString">codesString
	^
'Afrikaans	af
Albanian	sq
Basque	eu
Belarusian	be
Bulgarian	bg
Catalan	ca
Chinese (Simplified)	zh-cn
Chinese (Traditional)	zh-tw
Croatian	hr
Czech	cs
Danish	da
Dutch	nl
Dutch (Belgium)	nl-be
Dutch (Netherlands)	nl-nl
English	en
English (Australia)	en-au
English (Belize)	en-bz
English (Canada)	en-ca
English (Ireland)	en-ie
English (Jamaica)	en-jm
English (New Zealand)	en-nz
English (Phillipines)	en-ph
English (South Africa)	en-za
English (Trinidad)	en-tt
English (United Kingdom)	en-gb
English (United States)	en-us
English (Zimbabwe)	en-zw
Estonian	et
Faeroese	fo
Finnish	fi
French	fr
French (Belgium)	fr-be
French (Canada)	fr-ca
French (France)	fr-fr
French (Luxembourg)	fr-lu
French (Monaco)	fr-mc
French (Switzerland)	fr-ch
Galician	gl
Gaelic	gd
German	de
German (Austria)	de-at
German (Germany)	de-de
German (Liechtenstein)	de-li
German (Luxembourg)	de-lu
German (Switzerland)	de-ch
Greek	el
Hawaiian	haw
Hungarian	hu
Icelandic	is
Indonesian	in
Irish	ga
Italian	it
Italian (Italy)	it-it
Italian (Switzerland)	it-ch
Japanese	ja
Korean	ko
Macedonian	mk
Norwegian	no
Polish	pl
Portuguese	pt
Portuguese (Brazil)	pt-br
Portuguese (Portugal)	pt-pt
Romanian	ro
Romanian (Moldova)	ro-mo
Romanian (Romania)	ro-ro
Russian	ru
Russian (Moldova)	ru-mo
Russian (Russia)	ru-ru
Serbian	sr
Slovak	sk
Slovenian	sl
Spanish	es
Spanish (Argentina)	es-ar
Spanish (Bolivia)	es-bo
Spanish (Chile)	es-cl
Spanish (Colombia)	es-co
Spanish (Costa Rica)	es-cr
Spanish (Dominican Republic)	es-do
Spanish (Ecuador)	es-ec
Spanish (El Salvador)	es-sv
Spanish (Guatemala)	es-gt
Spanish (Honduras)	es-hn
Spanish (Mexico)	es-mx
Spanish (Nicaragua)	es-ni
Spanish (Panama)	es-pa
Spanish (Paraguay)	es-py
Spanish (Peru)	es-pe
Spanish (Puerto Rico)	es-pr
Spanish (Spain)	es-es
Spanish (Uruguay)	es-uy
Spanish (Venezuela)	es-ve
Swedish	sv
Swedish (Finland)	sv-fi
Swedish (Sweden)	sv-se
Turkish	tr
Ukranian	uk'</body>

<body package="RSRSS-Tags" selector="generatedCategory">generatedCategory
	^'languages-generated'</body>
</methods>

<methods>
<class-id>Seaside.RRLanguageTag class</class-id> <category>generating</category>

<body package="RSRSS-Tags" selector="generateFor:">generateFor: aPair
	(self includesSelector: aPair first) ifFalse: [
		self 
			compile: aPair first, '
	self with: ''', aPair last, ''''
			classified: self generatedCategory ]</body>

<body package="RSRSS-Tags" selector="generateTags">generateTags
	^self codes do: [ :each |
		self generateFor: each ]</body>
</methods>

<methods>
<class-id>Seaside.RRChangesDemo</class-id> <category>model</category>

<body package="RSRSS-Demo" selector="dateOfImage">dateOfImage
	^DateAndTime now</body>

<body package="RSRSS-Demo" selector="dateOfLastChange">dateOfLastChange
	^DateAndTime now</body>

<body package="RSRSS-Demo" selector="recentChanges">recentChanges
	^SeasidePlatformSupport recentChanges
</body>
</methods>

<methods>
<class-id>Seaside.RRChangesDemo</class-id> <category>rendering</category>

<body package="RSRSS-Demo" selector="basePath">basePath
	^WADispatcher default basePath</body>

<body package="RSRSS-Demo" selector="baseUrl">baseUrl
	^WAUrl new
		scheme: #http;
		hostname: self session currentRequest host; "that looks a bit unsafe, better use #application"
		addToPath: self basePath;
		yourself</body>

<body package="RSRSS-Demo" selector="renderChange:on:">renderChange: aChange on: rss
	| url |
	url := self baseUrl addToPath: WABrowser appName; yourself.
	aChange addParametersTo: url.
	rss item: [
		rss title: aChange title.
		rss author: aChange author. "has to be an email address"
		rss link: url.
		rss description: [
				rss renderHtml: [ :h | self renderDescription:  aChange description on: h ]].
		rss publicationDate: (RRRfc822DateTime newDateAndTime: aChange timestamp) ]</body>

<body package="RSRSS-Demo" selector="renderChannelOn:">renderChannelOn: rss
	rss title: [
		rss text: 'Recent changes to the Seaside image'.
		rss space.
		rss text: SeasidePlatformSupport shortImageName].
	rss link: self baseUrl asString , '/'. "Should go to the default app if defined"
	rss description: [
		rss text: 'Changes that were recently made to the Seaside image.'.
		rss space.
		rss text: SeasidePlatformSupport imageName].
	rss language englishUnitedStates.
	rss publicationDate:
			(RRRfc822DateTime newDateAndTime: self dateOfLastChange).
	rss lastBuildDate:
			(RRRfc822DateTime newDateAndTime: self dateOfImage).
	rss defaultDocumentation.
	rss defaultGenerator.</body>

<body package="RSRSS-Demo" selector="renderContentOn:">renderContentOn: rss
	self renderChannelOn: rss.
	self renderRecentChangesOn: rss.
</body>

<body package="RSRSS-Demo" selector="renderDescription:on:">renderDescription: aString on: html 
	| aStream |
	aString isNil ifTrue: [ ^ self ].
	aStream := aString readStream.
	html preformatted: 
		[ html strong: aStream nextLine.
		aStream atEnd ifFalse: 
				[ html text: (String with: Character cr).
				html text: aStream upToEnd ]]</body>

<body package="RSRSS-Demo" selector="renderRecentChangesOn:">renderRecentChangesOn: rss
	self recentChanges do: [:each | self renderChange: each on: rss].
</body>

<body package="RSRSS-Demo" selector="updateRoot:">updateRoot: xmlRoot
	"Here as a reminder"
	super updateRoot: xmlRoot</body>
</methods>

<methods>
<class-id>Seaside.RRChangesDemo class</class-id> <category>accessing</category>

<body package="RSRSS-Demo" selector="description">description
	^'An RSS feed about recent changes to image '
		, SeasidePlatformSupport shortImageName
</body>
</methods>

<methods>
<class-id>Seaside.RRChangesDemo class</class-id> <category>initialization</category>

<body package="RSRSS-Demo" selector="initialize">initialize
	"Can be registered again, now that it works.
	This will cause the RSS symbol to show up in the url field of Safari and Firefox
	when using the dispatcher manager and viewer"
	self registerAsApplication: 'changes.rss'</body>
</methods>

<methods>
<class-id>Seaside.RRChangesDemo class</class-id> <category>testing</category>

<body package="RSRSS-Demo" selector="canBeRoot">canBeRoot
	^true</body>
</methods>

<methods>
<class-id>Seaside.RRRssStreamDocument</class-id> <category>testing</category>

<body package="RSRSS-Core" selector="shouldPrintCloseTagFor:">shouldPrintCloseTagFor: aString
	^true</body>
</methods>

<methods>
<class-id>Seaside.RRRssStreamDocument</class-id> <category>closing</category>

<body package="RSRSS-Core" selector="close">close
	self bodyStream nextPutAll: '&lt;/channel&gt;&lt;/rss&gt;'</body>
</methods>

<methods>
<class-id>Seaside.RRRssStreamDocument</class-id> <category>inner-html</category>

<body package="RSRSS-Core" selector="forHtml">forHtml
	state := #body.</body>
</methods>

<methods>
<class-id>Seaside.RRRssStreamDocument class</class-id> <category>inner-html</category>

<body package="RSRSS-Core" selector="forHtml">forHtml
	^self new forHtml</body>
</methods>

<methods>
<class-id>Seaside.RRStylesOne</class-id> <category>css</category>

<body package="RSRSS-Demo" selector="style">style
	^'
rss {
	display: block;
	font-family: verdana, arial;
}
title {
	display: block;
	margin: 5px;
	padding: 2px;
	color: gray;
	border-bottom: 1px solid silver;
}
link {
	display: block;
	font-size: small;
	padding-left: 10px;
}
item {
	display: block;
	padding: 2px 30px 2px 30px;
}
docs {
	display: block;
	background-color: #ffffe6;
	margin: 20px;
	text-align: center;
	padding: 5px;
	color: #7f7f7f;
	border: 1px solid silver;
}
/* all hidden elements */
language, lastBuildDate, ttl, guid, category, description, pubDate {
	display: none;
}
'</body>
</methods>

<methods>
<class-id>Seaside.RRDayTag</class-id> <category>attributes</category>

<body package="RSRSS-Tags" selector="monday">monday
	^self with: 'Monday'</body>

<body package="RSRSS-Tags" selector="saturday">saturday
	^self with: 'Saturday'</body>

<body package="RSRSS-Tags" selector="sunday">sunday
	^self with: 'Sunday'</body>

<body package="RSRSS-Tags" selector="thursday">thursday
	^self with: 'Thursday'</body>

<body package="RSRSS-Tags" selector="triday">triday
	^self with: 'Friday'</body>

<body package="RSRSS-Tags" selector="tuesday">tuesday
	^self with: 'Tuesday'</body>

<body package="RSRSS-Tags" selector="wednesday">wednesday
	^self with: 'Wednesday'</body>
</methods>

<methods>
<class-id>Seaside.RRDayTag</class-id> <category>accessing</category>

<body package="RSRSS-Tags" selector="tag">tag
	^'day'</body>
</methods>

<methods>
<class-id>Seaside.RRRssSession</class-id> <category>http</category>

<body package="RSRSS-Core" selector="contentType">contentType
	^RRRssRoot defaultContentType</body>
</methods>

<methods>
<class-id>Seaside.RRRssSession</class-id> <category>responding</category>

<body package="RSRSS-Core" selector="outputDocumentClass">outputDocumentClass
	"To be subclassed as needed"
	^RRRssStreamDocument</body>
</methods>

<methods>
<class-id>Seaside.RRRssRoot</class-id> <category>accessing</category>

<body package="RSRSS-Core" selector="contentType">contentType
	^self class defaultContentType</body>
</methods>

<methods>
<class-id>Seaside.RRRssRoot</class-id> <category>writing</category>

<body package="RSRSS-Core" selector="writeOn:">writeOn: aStream
	aStream nextPutAll: '&lt;?xml version="1.0" encoding="'.
	aStream nextPutAll: self charSet.
	aStream nextPutAll: '"?&gt;'.
	
	styles do: [:ea | self writeStyle: ea on: aStream].
	
	aStream nextPutAll: '&lt;rss'.
	htmlAttrs writeOn: aStream.
	aStream nextPutAll: '&gt;&lt;channel&gt;'.</body>

<body package="RSRSS-Core" selector="writeStyle:on:">writeStyle: aString on: aStream 
	| url session mimeType |
	"Guessing the mime type"
	mimeType := (aString beginsWith: '&lt;?xml') 
				ifTrue: ['text/xsl']
				ifFalse: ['text/css'].
	session := WACurrentSession value.
	url := session application urlForRequestHandler: (WADocumentHandler 
						document: aString
						mimeType: mimeType
						fileName: nil).
	url hostname: session currentRequest host.
	aStream
		nextPutAll: '&lt;?xml-stylesheet href="';
		nextPutAll: url displayString;
		nextPutAll: '" type="';
		nextPutAll: mimeType;
		nextPutAll: '"?&gt;'</body>
</methods>

<methods>
<class-id>Seaside.RRRssRoot</class-id> <category>private</category>

<body package="RSRSS-Core" selector="initialize">initialize
	"sorry but there's no way how I can send super"
	
	self title: 'hack to prevent error'.
	htmlAttrs := WAHtmlAttributes new
		at: 'xmlns:content' put: 'http://purl.org/rss/1.0/modules/content/';
		at: 'xmlns:wfw' put: 'http://wellformedweb.org/CommentAPI/';
		at: 'xmlns:dc' put: 'http://purl.org/dc/elements/1.1/';
		yourself.
	headAttrs := WAHtmlAttributes new.
	bodyAttrs := WAHtmlAttributes new.
	headElements := OrderedCollection new.
	scripts := OrderedCollection new.
	styles := OrderedCollection new.
	
	htmlAttrs at: 'version' put: '2.0'</body>
</methods>

<methods>
<class-id>Seaside.RRRssRoot class</class-id> <category>accessing</category>

<body package="RSRSS-Core" selector="defaultContentType">defaultContentType
	^'application/rss+xml' "; charset=utf-8"</body>
</methods>

<methods>
<class-id>Seaside.RRSourceTag</class-id> <category>attributes</category>

<body package="RSRSS-Tags" selector="url:">url: aString
	self attributeAt: 'url' put: aString</body>
</methods>

<methods>
<class-id>Seaside.RRSourceTag</class-id> <category>accessing</category>

<body package="RSRSS-Tags" selector="tag">tag
	^'source'</body>
</methods>

<methods>
<class-id>Seaside.RRRfc822DateTime</class-id> <category>accessing</category>

<body package="RSRSS-Model" selector="dateAndTime">dateAndTime
	^dateAndTime</body>

<body package="RSRSS-Model" selector="dateAndTime:">dateAndTime: anObject
	dateAndTime := anObject</body>

<body package="RSRSS-Model" selector="timezoneString">timezoneString
	^timezoneString</body>

<body package="RSRSS-Model" selector="timezoneString:">timezoneString: anObject
	timezoneString := anObject</body>
</methods>

<methods>
<class-id>Seaside.RRRfc822DateTime</class-id> <category>printing</category>

<body package="RSRSS-Model" selector="printString">printString
	^String streamContents: [ :stream |
		stream
			nextPutAll: (dateAndTime dayOfWeekName first: 3);
			nextPutAll: ', ';
			nextPutAll: (dateAndTime dayOfMonth printPaddedWith: $0 to: 2);
			space;
			nextPutAll: (dateAndTime monthName first: 3);
			space;
			nextPutAll: dateAndTime year displayString;
			space;
			nextPutAll: (dateAndTime hour24 printPaddedWith: $0 to: 2);
			nextPut: $:;
			nextPutAll: (dateAndTime minute printPaddedWith: $0 to: 2); 
			nextPut: $:;
			nextPutAll: (dateAndTime second printPaddedWith: $0 to: 2);
			space;
			nextPutAll: timezoneString ]</body>
</methods>

<methods>
<class-id>Seaside.RRRfc822DateTime class</class-id> <category>instance creation</category>

<body package="RSRSS-Model" selector="dateAndTime:timezoneString:">dateAndTime: aDateAndTime timezoneString: aString
	^self new
		dateAndTime: aDateAndTime;
		timezoneString: aString;
		yourself</body>

<body package="RSRSS-Model" selector="newDateAndTime:">newDateAndTime: aDateAndTime
	^self
		newDateAndTime: aDateAndTime
		offset: aDateAndTime offset</body>

<body package="RSRSS-Model" selector="newDateAndTime:offset:">newDateAndTime: aDateAndTime offset: aDuration
	^self
		dateAndTime: aDateAndTime
		timezoneString: (self offsetString:  aDuration)</body>

<body package="RSRSS-Model" selector="newUtc:">newUtc: aDateAndTime
	^self
		dateAndTime: aDateAndTime asUTC
		timezoneString: 'UT'</body>
</methods>

<methods>
<class-id>Seaside.RRRfc822DateTime class</class-id> <category>private</category>

<body package="RSRSS-Model" selector="offsetString:">offsetString: aDuration
	^String streamContents: [ :stream |
		| positive |
		positive := aDuration asSeconds &gt; 0
		 	or: [ aDuration asSeconds = 0
				and: [ aDuration nanoSeconds &gt; 0 ] ].
		stream nextPut: (positive ifTrue: [ $+ ] ifFalse: [ $- ]).
		stream nextPutAll: (aDuration hours printPaddedWith: $0 to: 2).
		stream nextPutAll: (aDuration minutes printPaddedWith: $0 to: 2) ]</body>
</methods>

<methods>
<class-id>Seaside.RRStylesThree</class-id> <category>xslt</category>

<body package="RSRSS-Demo" selector="style">style
	^'&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
&lt;xsl:template match="/rss"&gt;
 	&lt;html&gt;
 	&lt;head&gt;
 	    &lt;link href="some-more-work-to-do-here.css" rel="stylesheet" type="text/css" /&gt;
 	    &lt;style type="text/css"&gt;
 	    body {
 	        font-size:0.83em;
 	    }
 	    &lt;/style&gt;
 	&lt;/head&gt;
 	&lt;body&gt;
 	    &lt;div id="logo"&gt;
 	        &lt;xsl:element name="a"&gt;
 	            &lt;xsl:attribute name="href"&gt;
 	                &lt;xsl:value-of select="channel/link" /&gt;
 	            &lt;/xsl:attribute&gt;
 	            &lt;xsl:value-of select="channel/title" /&gt;
 	        &lt;/xsl:element&gt;
 	    &lt;/div&gt;
 	    &lt;div class="Snippet" style="border-width:0; background-color:#FFF; margin:1em"&gt;
 	        &lt;div class="titleWithLine"&gt;
 	            &lt;xsl:value-of select="channel/description" /&gt;
 	        &lt;/div&gt;
 	        &lt;dl style="padding-right:1em"&gt;
 	            &lt;xsl:for-each select="channel/item"&gt;
 	                &lt;dd&gt;
 	                    &lt;xsl:element name="a"&gt;
 	                        &lt;xsl:attribute name="href"&gt;
 	                            &lt;xsl:value-of select="link"/&gt;
 	                        &lt;/xsl:attribute&gt;
 	                        &lt;xsl:value-of select="title"/&gt;
 	                    &lt;/xsl:element&gt;
 	                &lt;/dd&gt;
 	                &lt;dt&gt;
 	                    &lt;xsl:value-of select="description" /&gt;&lt;br /&gt;
 	                    &lt;span class="comments"&gt;&lt;xsl:value-of select="pubDate" /&gt;&lt;/span&gt;
 	                &lt;/dt&gt;
 	            &lt;/xsl:for-each&gt;
 	        &lt;/dl&gt;
 	    &lt;/div&gt;
 	    &lt;div id="footer"&gt;
 	        &lt;xsl:value-of select="channel/copyright" /&gt;
 	    &lt;/div&gt;
 	&lt;/body&gt;
 	&lt;/html&gt;
 	&lt;/xsl:template&gt;
 	&lt;/xsl:stylesheet&gt;
'</body>
</methods>

<methods>
<class-id>Seaside.RRDemo</class-id> <category>rendering</category>

<body package="RSRSS-Demo" selector="renderChannelOn:">renderChannelOn: rss
	rss title: 'Liftoff News'.
	rss link: 'http://liftoff.msfc.nasa.gov/'.
	rss description: 'Liftoff to Space Exploration.'.
	rss language englishUnitedStates.
	rss publicationDate: 'Tue, 10 Jun 2003 04:00:00 GMT'.
	rss lastBuildDate: 'Tue, 10 Jun 2003 09:41:01 GMT'.
	rss defaultDocumentation.
	rss generator: 'Weblog Editor 2.0'.
	rss managingEditor: 'editor@example.com'.
	rss webMaster: 'webmaster@example.com'</body>

<body package="RSRSS-Demo" selector="renderContentOn:">renderContentOn: rss
	self renderChannelOn: rss.
	self renderFirstItemOn: rss.
	self renderSecondItemOn: rss.
	self renderThirdItemOn: rss.
	self renderFourthtemOn: rss</body>

<body package="RSRSS-Demo" selector="renderFirstItemOn:">renderFirstItemOn: rss
	rss item: [
		rss title: 'Star City'.
		rss author: 'joesmith@example.com (Joe Smith)'.
		rss link: 'http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp'.
		rss description: 'How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia''s Star City.'.
		rss publicationDate: (RRRfc822DateTime newDateAndTime: self firstPublicationDate).
		rss guid: 'http://liftoff.msfc.nasa.gov/2003/06/03.html#item573' ]</body>

<body package="RSRSS-Demo" selector="renderFourthtemOn:">renderFourthtemOn: rss
	rss item: [
		rss title: 'Astronauts'' Dirty Laundry'.
		rss author: (RREmailAddress address: 'joesmith@example.com').
		rss link: 'http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp'.
		rss description: 'Compared to earlier spacecraft, the International Space Station has many luxuries, but laundry facilities are not one of them. Instead, astronauts have other options.'.
		rss publicationDate: 'Tue, 20 May 2003 08:56:02 GMT'.
		rss guid: 'http://liftoff.msfc.nasa.gov/2003/05/20.html#item570' ]</body>

<body package="RSRSS-Demo" selector="renderSecondItemOn:">renderSecondItemOn: rss
	rss item: [
		rss title: 'Space Exploration'.
		rss author: 'Joe Smith &lt;joesmith@example.com&gt;'.
		rss link: 'http://liftoff.msfc.nasa.gov/'.
		rss description: 'Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a partial eclipse of the Sun on Saturday, May 31st.'.
		rss publicationDate: (RRRfc822DateTime newUtc: self secondPublicationDate).
		rss guid: 'http://liftoff.msfc.nasa.gov/2003/05/30.html#item572' ]</body>

<body package="RSRSS-Demo" selector="renderThirdItemOn:">renderThirdItemOn: rss
	rss item: [
		rss title: 'The Engine That Does More'.
		rss author: (RREmailAddress address: 'joesmith@example.com' username: 'Joe Smith').
		rss link: 'http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp'.
		rss description: 'Before man travels to Mars, NASA hopes to design new engines that will let us fly through the Solar System more quickly.  The proposed VASIMR engine would do that.'.
		rss publicationDate: (RRRfc822DateTime dateAndTime: self thirdPublicationDate timezoneString: 'EST').
		rss guid: 'http://liftoff.msfc.nasa.gov/2003/05/27.html#item571' ]</body>
</methods>

<methods>
<class-id>Seaside.RRDemo</class-id> <category>private</category>

<body package="RSRSS-Demo" selector="firstPublicationDate">firstPublicationDate
	^DateAndTime
		year: 2003
		month: 6
		day: 3
		hour: 9
		minute: 39
		second: 21</body>

<body package="RSRSS-Demo" selector="fourthPublicationDate">fourthPublicationDate
	^DateAndTime
		year: 2003
		month: 5
		day: 20
		hour: 8
		minute: 56
		second: 02</body>

<body package="RSRSS-Demo" selector="secondPublicationDate">secondPublicationDate
	^DateAndTime
		year: 2003
		month: 5
		day: 30
		hour: 11
		minute: 6
		second: 42</body>

<body package="RSRSS-Demo" selector="thirdPublicationDate">thirdPublicationDate
	^DateAndTime
		year: 2003
		month: 5
		day: 27
		hour: 8
		minute: 37
		second: 32</body>
</methods>

<methods>
<class-id>Seaside.RRDemo class</class-id> <category>accessing</category>

<body package="RSRSS-Demo" selector="description">description
	^'RSS Demo'</body>
</methods>

<methods>
<class-id>Seaside.RRDemo class</class-id> <category>testing</category>

<body package="RSRSS-Demo" selector="canBeRoot">canBeRoot
	^true</body>
</methods>

<methods>
<class-id>Seaside.RRCloudTag</class-id> <category>attributes</category>

<body package="RSRSS-Tags" selector="domain:">domain: aString
	^self attributeAt: 'domain' put: aString</body>

<body package="RSRSS-Tags" selector="path:">path: aString
	^self attributeAt: 'path' put: aString</body>

<body package="RSRSS-Tags" selector="port:">port: anInteger
	^self attributeAt: 'port' put: anInteger</body>

<body package="RSRSS-Tags" selector="protocol:">protocol: aString
	^self attributeAt: 'protocol' put: aString</body>

<body package="RSRSS-Tags" selector="registerProcedure:">registerProcedure: aString
	^self attributeAt: 'registerProcedure' put: aString</body>
</methods>

<methods>
<class-id>Seaside.RRCloudTag</class-id> <category>protocols</category>

<body package="RSRSS-Tags" selector="beSoap">beSoap
	self protocol: 'soap'</body>

<body package="RSRSS-Tags" selector="beXmlRpc">beXmlRpc
	self protocol: 'xml-rpc'</body>
</methods>

<methods>
<class-id>Seaside.RRCloudTag</class-id> <category>accessing</category>

<body package="RSRSS-Tags" selector="tag">tag
	^'cloud'</body>
</methods>

<methods>
<class-id>Seaside.RRCloudTag class</class-id> <category>accessing-tags</category>

<body package="RSRSS-Tags" selector="tags">tags
	"
	self generateTags
	"

	^ #(
		('item' item item: 'item')
	
		('title' title title: 'channel-required')
		('link' link link: 'channel-required')
		('description' description description: 'channel-required')

		
		('language' language language: 'channel-optional')
		('copyright' copyright copyright: 'channel-optional')
		('managingEditor' managingEditor managingEditor: 'channel-optional')
		('webMaster' webMaster webMaster: 'channel-optional')
		('pubDate' publicationDate publicationDate: 'channel-optional')
		('lastBuildDate' lastBuildDate lastBuildDate: 'channel-optional')
		('category' category category: 'channel-optional')
		('generator' generator generator: 'channel-optional')
		('docs' documentation documentation: 'channel-optional')
		('cloud' cloud cloud: 'channel-optional')
		('ttl' timeToLive timeToLive: 'channel-optional')
		('image' image image: 'channel-optional')
		('rating' rating rating: 'channel-optional')
		('textInput' textInput textInput: 'channel-optional')
		('skipHours' skipHours skipHours: 'channel-optional')
		('skipDays' skipDays skipDays: 'channel-optional')
		
		('comments' comments comments: 'item-optional')
		('enclosure' enclosure enclosure: 'item-optional')
		('guid' guid guid: 'item-optional')
		
		('name' name name: 'image-required')
		
		)</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>channel-optional</category>

<body package="RSRSS-Core" selector="category">category
	"---- as optional subelement of channel ----
	Specify one or more categories that the channel belongs to. Follows the same rules as the &lt;item&gt;-level category element below.
	
	---- as optional subelement of item ----
	Includes the item in one or more categories.
	
	The value of the element is a forward-slash-separated string that identifies a hierarchic location in the indicated taxonomy. Processors may establish conventions for the interpretation of categories.
	
	You may include as many category elements as you need to, for different domains, and to have an item cross-referenced in different parts of the same domain.
	
	It has one optional attribute, domain, a string that identifies a categorization taxonomy.
	
	In RSS 2.0, a provision is made for linking a channel to its identifier in a cataloging system, using the channel-level category feature, described above. For example, to link a channel to its Syndic8 identifier, include a category element as a sub-element of &lt;channel&gt;, with domain 'Syndic8', and value the identifier for your channel in the Syndic8 database. The appropriate category element for Scripting News would be
	
	rss category
		domain: 'Syndic8';
		with: 1765"
	^ self brush: RRCategoryTag new</body>

<body package="RSRSS-Core" selector="category:">category: aBlock
	self category with: aBlock</body>

<body package="RSRSS-Core" selector="cloud">cloud
	"Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.
	
	for more info see RRCloudTag"
	^ self brush: RRCloudTag new</body>

<body package="RSRSS-Core" selector="cloud:">cloud: aBlock
	self cloud with: aBlock</body>

<body package="RSRSS-Core" selector="copyright">copyright
	"Copyright notice for content in the channel."
	^ self tag: 'copyright'</body>

<body package="RSRSS-Core" selector="copyright:">copyright: aBlock
	self copyright with: aBlock</body>

<body package="RSRSS-Core" selector="defaultDocumentation">defaultDocumentation
	self documentation: 'http://www.rssboard.org/rss-specification'</body>

<body package="RSRSS-Core" selector="defaultGenerator">defaultGenerator
	self generator: self defaultGeneratorString</body>

<body package="RSRSS-Core" selector="documentation">documentation
	"A URL that points to the documentation for the format used in the RSS file. It's probably a pointer to this page. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.
	e.g. 'http://www.rssboard.org/rss-specification'
	see #defaultDocumentation"
	^ self tag: 'docs'</body>

<body package="RSRSS-Core" selector="documentation:">documentation: aBlock
	self documentation with: aBlock</body>

<body package="RSRSS-Core" selector="generator">generator
	"A string indicating the program used to generate the channel.
	e.g.: 'RSRSS-pmm.3'
	see #defaultGenerator"
	^ self tag: 'generator'</body>

<body package="RSRSS-Core" selector="generator:">generator: aBlock
	self generator with: aBlock</body>

<body package="RSRSS-Core" selector="image">image
	"Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
	the following subelements are required:
		url
		title
		link
	the following subelements are optional:
		width
		height
		description
	"
	^ self tag: 'image'</body>

<body package="RSRSS-Core" selector="image:">image: aBlock
	self image with: aBlock</body>

<body package="RSRSS-Core" selector="language">language
	"The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is implemented in the 'languages-generated' protocl of RRLanguageTag. You may also use values defined by the W3C (http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes)."
	^ self brush: RRLanguageTag new</body>

<body package="RSRSS-Core" selector="language:">language: aBlock
	self language with: aBlock</body>

<body package="RSRSS-Core" selector="lastBuildDate">lastBuildDate
	"The last time the content of the channel changed.
	again an RFC 822 date like all the other dates
	e.g.: 'Sat, 07 Sep 2002 09:42:31 GMT'"
	^ self tag: 'lastBuildDate'</body>

<body package="RSRSS-Core" selector="lastBuildDate:">lastBuildDate: aBlock
	self lastBuildDate with: aBlock</body>

<body package="RSRSS-Core" selector="managingEditor">managingEditor
	"Email address for person responsible for editorial content.
	e.g.: 'George Matesky &lt;geo@herald.com&gt;'"
	^ self tag: 'managingEditor'</body>

<body package="RSRSS-Core" selector="managingEditor:">managingEditor: aBlock
	self managingEditor with: aBlock</body>

<body package="RSRSS-Core" selector="publicationDate">publicationDate
	"---- as optional subelement of channel ----
	The publication date for the content in the channel. For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822(http://asg.web.cmu.edu/rfc/rfc822.html#sec-5), with the exception that the year may be expressed with two characters or four characters (four preferred).
	
	---- as optional subelement of item ----
	Indicates when the item was published.
	Its value is a date, indicating when the item was published. If it's a date in the future, aggregators may choose to not display the item until that date.
	
	e.g: 'Sat, 07 Sep 2002 00:00:01 GMT'
	minimal: '20 Jun 82 23:59 EST'"
	^ self tag: 'pubDate'</body>

<body package="RSRSS-Core" selector="publicationDate:">publicationDate: aBlock
	self publicationDate with: aBlock</body>

<body package="RSRSS-Core" selector="rating">rating
	"The PICS (http://www.w3.org/PICS/) rating for the channel."
	^ self tag: 'rating'</body>

<body package="RSRSS-Core" selector="rating:">rating: aBlock
	self rating with: aBlock</body>

<body package="RSRSS-Core" selector="skipDays">skipDays
	"A hint for aggregators telling them which days they can skip.
	
	An XML element that contains up to seven &lt;day&gt; sub-elements whose value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. Aggregators may not read the channel during days listed in the skipDays element."
	^ self tag: 'skipDays'</body>

<body package="RSRSS-Core" selector="skipDays:">skipDays: aBlock
	self skipDays with: aBlock</body>

<body package="RSRSS-Core" selector="skipHours">skipHours
	"A hint for aggregators telling them which hours they can skip.
	
	An XML element that contains up to 24 &lt;hour&gt; sub-elements whose value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the skipHours element. The hour beginning at midnight is hour zero."
	^ self tag: 'skipHours'</body>

<body package="RSRSS-Core" selector="skipHours:">skipHours: aBlock
	self skipHours with: aBlock</body>

<body package="RSRSS-Core" selector="textInput">textInput
	"Specifies a text input box that can be displayed with the channel.
	The purpose of the &lt;textInput&gt; element is something of a mystery. You can use it to specify a search engine box. Or to allow a reader to provide feedback. Most aggregators ignore it.
	
	It has the following required subelements:
		title
		description
		name
		link"
	^ self tag: 'textInput'</body>

<body package="RSRSS-Core" selector="textInput:">textInput: aBlock
	self textInput with: aBlock</body>

<body package="RSRSS-Core" selector="timeToLive">timeToLive
	"It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. This makes it possible for RSS sources to be managed by a file-sharing network such as Gnutella.
	
	e.g.: 60"
	^ self tag: 'ttl'</body>

<body package="RSRSS-Core" selector="timeToLive:">timeToLive: aBlock
	self timeToLive with: aBlock</body>

<body package="RSRSS-Core" selector="webMaster">webMaster
	"Email address for person responsible for technical issues relating to channel.
	e.g.: 'Betty Guernsey &lt;betty@herald.com&gt;'"
	^ self tag: 'webMaster'</body>

<body package="RSRSS-Core" selector="webMaster:">webMaster: aBlock
	self webMaster with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>private</category>

<body package="RSRSS-Core" selector="close">close
	self flush</body>

<body package="RSRSS-Core" selector="comment:">comment: aString</body>

<body package="RSRSS-Core" selector="defaultGeneratorString">defaultGeneratorString
	^SeasidePlatformSupport defaultRSSGeneratorString</body>

<body package="RSRSS-Core" selector="html:">html: aString
	self flush.
	self document text: aString</body>

<body package="RSRSS-Core" selector="tag:">tag: aString
	"copy pasted from WAHtmlCanvas"
	^ self brush: (WAGenericTag tag: aString)</body>

<body package="RSRSS-Core" selector="text:">text: aString
	"copy pasted from WAHtmlCanvas"
	self html: (self class encode: aString)</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>well-formed-web</category>

<body package="RSRSS-Core" selector="comment">comment
	"This element appears in RSS feeds and contains the URI that comment entries are to be POSTed to. The details of this are outlined in the CommentAPI Specification (http://wellformedweb.org/story/9)"
	^self tag: 'wfw:comment'</body>

<body package="RSRSS-Core" selector="commentRss">commentRss
	"This element also appears in RSS feeds and contains the URI of the RSS feed for comments on that Item. This is documented in Chris Sells' Specification(http://www.sellsbrothers.com/spout/default.aspx?content=archive.htm#exposingRssComments). Note that for quite a while this page has had a typo and erroneously referred to this element as 'commentRSS' as opposed to the correct 'commentRss'. Feed consumers should be aware that they may run into both spellings in the wild. Please see this page (http://www.intertwingly.net/blog/2006/04/16/commentRss) for more information."
	^self tag: 'wfw:commentRss'</body>

<body package="RSRSS-Core" selector="commentRss:">commentRss: aBlock
	^self commentRss with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>channel-required</category>

<body package="RSRSS-Core" selector="description">description
	"
	---- as required subelement of channel ----
	Phrase or sentence describing the channel.
	e.g.: 'The latest news from GoUpstate.com, a Spartanburg Herald-Journal Web site.'
	
	---- a required subelement of item ----
	The item synopsis.
	
	---- as required subelement of textInput ----
	Explains the text input area.
	
	----  as an optional subelement of image ----
	contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering."
	^ self tag: 'description'</body>

<body package="RSRSS-Core" selector="description:">description: aBlock
	self description with: aBlock</body>

<body package="RSRSS-Core" selector="link">link
	"---- as required subelement of channel ----
	The URL to the HTML website corresponding to the channel.
	e.g.: 'http://www.goupstate.com/'
	
	---- as required subelement of item ----
	The URL of the item.
	
	---- as required subelement of image ----
	is the URL of the site, when the channel is rendered, the image is a link to the site. (Note, in practice the image &lt;title&gt; and &lt;link&gt; should have the same value as the channel's &lt;title&gt; and &lt;link&gt;
	
	---- as required subelement of textInput ----
	The URL of the CGI script that processes text input requests."
	
	^ self tag: 'link'</body>

<body package="RSRSS-Core" selector="link:">link: aBlock
	self link with: aBlock</body>

<body package="RSRSS-Core" selector="title">title
	"----- as required subelement of channel ----
	The name of the channel. It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.
	e.g.: 'GoUpstate.com News Headlines'
	
	---- as required subelement of item ----
	The title of the item.
	
	---- as required subelement of image ----
	describes the image, it's used in the ALT attribute of the HTML &lt;img&gt; tag when the channel is rendered in HTML
	
	---- as required subelement of textInput ----
	The label of the Submit button in the text input area."
	
	^ self tag: 'title'</body>

<body package="RSRSS-Core" selector="title:">title: aBlock
	self title with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>item-optional</category>

<body package="RSRSS-Core" selector="author">author
	"Email address of the author of the item.
	
	It's the email address of the author of the item. For newspapers and magazines syndicating via RSS, the author is the person who wrote the article that the &lt;item&gt; describes. For collaborative weblogs, the author of the item might be different from the managing editor or webmaster. For a weblog authored by a single individual it would make sense to omit the &lt;author&gt; element."
	^ self tag: 'author'</body>

<body package="RSRSS-Core" selector="author:">author: aBlock
	self author with: aBlock</body>

<body package="RSRSS-Core" selector="comments">comments
	"URL of a page for comments relating to the item.
	
	If present, it is the url of the comments page for the item."
	^ self tag: 'comments'</body>

<body package="RSRSS-Core" selector="comments:">comments: aBlock
	self comments with: aBlock</body>

<body package="RSRSS-Core" selector="enclosure">enclosure
	"Describes a media object that is attached to the item.
	
	It has three required attributes. url says where the enclosure is located, length says how big it is in bytes, and type says what its type is, a standard MIME type.
	
	The url must be an http url.
	
	e.g.:
	rss enclosure
		url: 'http://www.scripting.com/mp3s/weatherReportSuite.mp3';
		length: 12216320;
		type: 'audio/mpeg'"
	^ self brush: RREnclosureTag new</body>

<body package="RSRSS-Core" selector="enclosure:">enclosure: aBlock
	self enclosure with: aBlock</body>

<body package="RSRSS-Core" selector="guid">guid
	"A string that uniquely identifies the item.
	
	guid stands for globally unique identifier. It's a string that uniquely identifies the item. When present, an aggregator may choose to use this string to determine if an item is new.
	
	e.g.: 'http://some.server.com/weblogItem3207'
	
	There are no rules for the syntax of a guid. Aggregators must view them as a string. It's up to the source of the feed to establish the uniqueness of the string.
	
	If the guid element has an attribute named isPermaLink with a value of true, the reader may assume that it is a permalink to the item, that is, a url that can be opened in a Web browser, that points to the full item described by the &lt;item&gt; element. An example:
	
	e.g.:
	rss guid
		bePermaLink;
		with: 'http://inessential.com/2002/09/01.php#a2'
		
	isPermaLink is optional, its default value is true. If its value is false, the guid may not be assumed to be a url, or a url to anything in particular."
	^ self brush: RRGuidTag new</body>

<body package="RSRSS-Core" selector="guid:">guid: aBlock
	self guid with: aBlock</body>

<body package="RSRSS-Core" selector="source">source
	"The RSS channel that the item came from.
	
	Its value is the name of the RSS channel that the item came from, derived from its &lt;title&gt;. It has one required attribute, url, which links to the XMLization of the source.
	
	rss source
		url: 'http://www.tomalak.org/links2.xml';
		with: 'Tomalak''s Realm'
	
	The purpose of this element is to propagate credit for links, to publicize the sources of news items. It can be used in the Post command of an aggregator. It should be generated automatically when forwarding an item from an aggregator to a weblog authoring tool."
	^ self brush: RRSourceTag new</body>

<body package="RSRSS-Core" selector="source:">source: aBlock
	self source with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>inner-html</category>

<body package="RSRSS-Core" selector="renderHtml:">renderHtml: aBlock 
	| aRenderingContext anHtmlRenderer |
	aRenderingContext := WARenderingContext new document: RRRssStreamDocument forHtml.
	anHtmlRenderer := WARenderCanvas context: aRenderingContext callbacks: nil.
	aBlock value: anHtmlRenderer.
	self text: aRenderingContext document stream contents</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>initialize-release</category>

<body package="RSRSS-Core" selector="initializeWithContext:callbacks:">initializeWithContext: aRenderingContext callbacks: aCallbackStore
	context := aRenderingContext.
	callbacks := aCallbackStore</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>skipHours</category>

<body package="RSRSS-Core" selector="hour">hour
	^ self tag: 'hour'</body>

<body package="RSRSS-Core" selector="hour:">hour: aBlock
	self hour with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>image-optional</category>

<body package="RSRSS-Core" selector="height">height
	"Optional elements include &lt;width&gt; and &lt;height&gt;, numbers, indicating the width and height of the image in pixels.
	
	Maximum value for height is 400, default value is 31."
	^ self tag: 'height'</body>

<body package="RSRSS-Core" selector="height:">height: aBlock
	self height with: aBlock</body>

<body package="RSRSS-Core" selector="width">width
	"Optional elements include &lt;width&gt; and &lt;height&gt;, numbers, indicating the width and height of the image in pixels.
	
	Maximum value for width is 144, default value is 88."
	^ self tag: 'width'</body>

<body package="RSRSS-Core" selector="width:">width: aBlock
	self width with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>dublin-core</category>

<body package="RSRSS-Core" selector="creator">creator
	"An entity primarily responsible for making the resource.
	Examples of a Creator include a person, an organization, or a service. Typically, the name of a Creator should be used to indicate the entity.
	
	http://dublincore.org/documents/dces/
	http://purl.org/dc/elements/1.1/creator"
	^ self tag: 'dc:creator'</body>

<body package="RSRSS-Core" selector="creator:">creator: aBlock
	self creator with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>image-required</category>

<body package="RSRSS-Core" selector="url">url
	"is the URL of a GIF, JPEG or PNG image that represents the channel."
	^ self tag: 'url'</body>

<body package="RSRSS-Core" selector="url:">url: aBlock
	self url with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>convenience</category>

<body package="RSRSS-Core" selector="cdata:">cdata: aString
	"aString must not include ']]&gt;'
	
	Google says if there is an error in the feed, there is a 0.02% chance
	that this is the cause, combined with the fact that about 7% of all feeds
	have errors there is a (2 / 10000) * (7 / 100) chance this goes wrong.
	Do you deal in chance?
	
	http://googlereader.blogspot.com/2005/12/xml-errors-in-feeds.html"
	self flush.
	self document text: '&lt;![CDATA['.
	self document text: aString.
	self document text: ']]&gt;'</body>

<body package="RSRSS-Core" selector="space">space
	self html: self spaceEntity</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>item</category>

<body package="RSRSS-Core" selector="item">item
	^ self tag: 'item'</body>

<body package="RSRSS-Core" selector="item:">item: aBlock
	self item with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>textinput-required</category>

<body package="RSRSS-Core" selector="name">name
	"The name of the text object in the text input area."
	^ self tag: 'name'</body>

<body package="RSRSS-Core" selector="name:">name: aBlock
	self name with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>accessing</category>

<body package="RSRSS-Core" selector="context">context
	^context</body>

<body package="RSRSS-Core" selector="document">document
	^self context document</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>content</category>

<body package="RSRSS-Core" selector="contentEncoded">contentEncoded
	"A module for the actual content of websites, in multiple formats.
	http://web.resource.org/rss/1.0/modules/content/
	
	example:
	rss contentEncoded: '&lt;p&gt;What a &lt;em&gt;beautiful&lt;/em&gt; day!&lt;/p&gt;'"
	^ self tag: 'content:encoded'</body>

<body package="RSRSS-Core" selector="contentEncoded:">contentEncoded: aString
	"A module for the actual content of websites.
	
	aString must not include ']]&gt;'"
	self contentEncoded
		with: [ self cdata: aString ]</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>skipDays</category>

<body package="RSRSS-Core" selector="day">day
	^ self brush: RRDayTag new</body>

<body package="RSRSS-Core" selector="day:">day: aBlock
	self day with: aBlock</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas</class-id> <category>xml</category>

<body package="RSRSS-Core" selector="spaceEntity">spaceEntity
	^'&amp;#160;'</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas class</class-id> <category>encoding</category>

<body package="RSRSS-Core" selector="encode:">encode: anObject
	^(Smalltalk hasClassNamed: #WAAbstractHtmlBuilder)
		ifTrue: [ (Smalltalk classNamed: #WAAbstractHtmlBuilder) encode: anObject ]
		ifFalse: [ super encode: anObject ]</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas class</class-id> <category>instance creation</category>

<body package="RSRSS-Core" selector="context:callbacks:">context: aRenderingContext callbacks: aCallbackStore
	^ self basicNew initializeWithContext: aRenderingContext callbacks: aCallbackStore</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas class</class-id> <category>accessing-tags</category>

<body package="RSRSS-Core" selector="tags">tags
	"
	self generateTags
	"

	^ #(
		('item' item item: 'item')
	
		('title' title title: 'channel-required')
		('link' link link: 'channel-required')
		('description' description description: 'channel-required')

		
		('language' language language: 'channel-optional')
		('copyright' copyright copyright: 'channel-optional')
		('managingEditor' managingEditor managingEditor: 'channel-optional')
		('webMaster' webMaster webMaster: 'channel-optional')
		('pubDate' publicationDate publicationDate: 'channel-optional')
		('lastBuildDate' lastBuildDate lastBuildDate: 'channel-optional')
		('category' category category: 'channel-optional')
		('generator' generator generator: 'channel-optional')
		('docs' documentation documentation: 'channel-optional')
		('cloud' cloud cloud: 'channel-optional')
		('ttl' timeToLive timeToLive: 'channel-optional')
		('image' image image: 'channel-optional')
		('rating' rating rating: 'channel-optional')
		('textInput' textInput textInput: 'channel-optional')
		('skipHours' skipHours skipHours: 'channel-optional')
		('skipDays' skipDays skipDays: 'channel-optional')
		
		('author' author author: 'item-optional')
		('comments' comments comments: 'item-optional')
		('enclosure' enclosure enclosure: 'item-optional')
		('guid' guid guid: 'item-optional')
		('source' source source: 'item-optional')
		('language' language language: 'item-optional')
		
		('width' width width: 'image-optional')
		('height' height height: 'image-optional')
		
		('name' name name: 'textinput-required')
		
		('hour' hour hour: 'skipHours')
		('day' day day: 'skipDays')
		
		('url' url url: 'image')
		)</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderCanvas class</class-id> <category>generating-tags</category>

<body package="RSRSS-Core" selector="generateBinaryFor:">generateBinaryFor: aCollection
	(aCollection size = 4 and: [(self includesSelector: aCollection third) not]) ifTrue: [
		self 
			compile: aCollection third, ' aBlock
	self ', aCollection second, ' with: aBlock'
			classified: aCollection fourth]</body>

<body package="RSRSS-Core" selector="generateUnaryFor:">generateUnaryFor: aCollection
	(self includesSelector: aCollection second) ifFalse: [
		self 
			compile: aCollection second, '
	^ self ', (self patternFor: aCollection first)
			classified: aCollection fourth ]</body>
</methods>

<methods>
<class-id>Seaside.RREnclosureTag</class-id> <category>attributes</category>

<body package="RSRSS-Tags" selector="length:">length: anInteger
	self attributeAt: 'length' put: anInteger</body>

<body package="RSRSS-Tags" selector="type:">type: aString
	self attributeAt: 'type' put: aString</body>

<body package="RSRSS-Tags" selector="url:">url: aString
	self attributeAt: 'url' put: aString</body>
</methods>

<methods>
<class-id>Seaside.RREnclosureTag</class-id> <category>accessing</category>

<body package="RSRSS-Tags" selector="tag">tag
	^'enclosure'</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderLoop</class-id> <category>accessing</category>

<body package="RSRSS-Core" selector="root:">root: aComponent
	self basicRoot: aComponent</body>
</methods>

<methods>
<class-id>Seaside.RRRssRenderLoop</class-id> <category>rendering</category>

<body package="RSRSS-Core" selector="run">run
	[(RRRssRender new root: root) go] repeat</body>
</methods>

<methods>
<class-id>Seaside.WARequestHandler</class-id> <category>*rsrss</category>

<body package="RSRSS-Extensions" selector="isFeed">isFeed
	^false</body>
</methods>

<methods>
<class-id>Seaside.WAApplication</class-id> <category>*rsrss</category>

<body package="RSRSS-Extensions" selector="isFeed">isFeed
	^self rootComponent isFeed</body>
</methods>

<methods>
<class-id>Seaside.WAComponent class</class-id> <category>*rsrss</category>

<body package="RSRSS-Extensions" selector="isFeed">isFeed
	^false</body>
</methods>

<methods>
<class-id>Seaside.WABrowser class</class-id> <category>*rsrss</category>

<body package="RSRSS-Extensions" selector="appName">appName
	"This is used to build the urls that are included
	in the RSS feeds"
	^ 'tools/classbrowser'</body>
</methods>

<methods>
<class-id>Seaside.WADispatcherComponent</class-id> <category>*rsrss</category>

<body package="RSRSS-Extensions" selector="addRssLinksToRoot:">addRssLinksToRoot: anHtmlRoot 
	| entryPoints |
	entryPoints := self entryPoints select: [ :each | each isFeed ].
	entryPoints do: [ :each | anHtmlRoot linkToRss: each basePath title: each description ]</body>

<body package="RSRSS-Extensions" selector="updateRoot:">updateRoot: aRoot 
	"This code is needed so that RSS symbol shows up
	in the url field of Safari or Firefox"
	super updateRoot: aRoot.
	self addRssLinksToRoot: aRoot</body>
</methods>

<methods>
<class-id>Seaside.WAHtmlRoot</class-id> <category>*rsrss</category>

<body package="RSRSS-Extensions" selector="linkToRss:title:">linkToRss: anUrlString title: aTtitleString
	self deprecatedApi.
	"self rss
		title: aTtitleString;
		url: anUrlString"
	self addHeadElement: ((WAHtmlElement named: 'link')
				attributeAt: 'href' put: anUrlString;
				attributeAt: 'rel' put: 'alternate';
				attributeAt: 'type' put: 'application/rss+xml';
				attributeAt: 'title' put: aTtitleString;
				notClosed;
				yourself)</body>

<body package="RSRSS-Extensions" selector="rss">rss
	^self link beAlternate; beRss; notClosed; yourself</body>
</methods>

<initialize>
<class-id>Seaside.RRChangesDemo</class-id>
</initialize>

<do-it>"Imported Classes:"</do-it>

<do-it>self error: 'Attempting to file-in parcel imports.  Choose terminate or close'</do-it>

<class>
<name>Object</name>
<environment>Core</environment>
<super></super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Kernel-Objects</category>
<attributes>
<package>Kernel-Objects</package>
</attributes>
</class>

<class>
<name>WAHtmlRoot</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>docType title htmlAttrs headAttrs bodyAttrs headElements scripts styles resourceBaseUrl </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Document</category>
<attributes>
<package>Seaside-Document</package>
</attributes>
</class>

<class>
<name>WARenderLoopMain</name>
<environment>Seaside</environment>
<super>Seaside.WAMain</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-RenderLoop</category>
<attributes>
<package>Seaside-RenderLoop</package>
</attributes>
</class>

<class>
<name>WARender</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>root context request url </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-RenderLoop</category>
<attributes>
<package>Seaside-RenderLoop</package>
</attributes>
</class>

<class>
<name>WAStyleLibrary</name>
<environment>Seaside</environment>
<super>Seaside.WAStringLibrary</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Libraries</category>
<attributes>
<package>Seaside-Libraries</package>
</attributes>
</class>

<class>
<name>WAHtmlStreamDocument</name>
<environment>Seaside</environment>
<super>Seaside.WAHtmlDocument</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>state stream </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Document</category>
<attributes>
<package>Seaside-Document</package>
</attributes>
</class>

<class>
<name>WARequestHandler</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>parent </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-RequestHandler</category>
<attributes>
<package>Seaside-RequestHandler</package>
</attributes>
</class>

<class>
<name>WAApplication</name>
<environment>Seaside</environment>
<super>Seaside.WARegistry</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>configuration libraries </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Session</category>
<attributes>
<package>Seaside-Session</package>
</attributes>
</class>

<class>
<name>WAComponent</name>
<environment>Seaside</environment>
<super>Seaside.WAPresenter</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>decoration </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Component</category>
<attributes>
<package>Seaside-Component</package>
</attributes>
</class>

<class>
<name>WADispatcherComponent</name>
<environment>Seaside</environment>
<super>Seaside.WAComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>dispatcher </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Components-Tools</category>
<attributes>
<package>Seaside-Components-Tools</package>
</attributes>
</class>

<class>
<name>WATagBrush</name>
<environment>Seaside</environment>
<super>Seaside.WABrush</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>attributes </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Canvas</category>
<attributes>
<package>Seaside-Canvas</package>
</attributes>
</class>

<class>
<name>WACanvas</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>currentBrush parentBrush painter </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Canvas</category>
<attributes>
<package>Seaside-Canvas</package>
</attributes>
</class>

<class>
<name>WARenderLoop</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>root </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-RenderLoop</category>
<attributes>
<package>Seaside-RenderLoop</package>
</attributes>
</class>

<class>
<name>WASession</name>
<environment>Seaside</environment>
<super>Seaside.WAExpiringHandler</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>continuations escapeContinuation monitor state currentRequest scripts jumpTo internalError cookiesEnabled </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Session</category>
<attributes>
<package>Seaside-Session</package>
</attributes>
</class>

</st-source>
