Schematron Pretty

     Pattern           

Structural Validation

     Rule   
rss
     Assert   
@versionAn RSS version identifier should be supplied
     Report   
@version != 0.91This Schematron validator is for RSS 0.91 only
     Assert   
count(channel) = 1An RSS element can only contain a single channel element
     Rule   
channel
     Assert   
titleYou must provide a title for your channel
     Assert   
linkYou must provide a link for your channel
     Assert   
descriptionYou must provide a description of your channel
     Assert   
languageYou must specify the language in which the content of your channel is written.
     Assert   
count(copyright) < 2Only one copyright element should be supplied per channel
     Assert   
count(image) < 2Only one image element should be supplied per channel
     Assert   
count(textinput) < 2Only one textinput element can be supplied per channel
     Assert   
count(skipHours) < 2One one skipHours element can be supplied per channel
     Assert   
count(skipDays) < 2One one skipDays element can be supplied per channel
     Assert   
managingEditorYou should provide an email address for the managing editor of your channel
     Assert   
webMasterYou should provide an email address for the webmaster of your channel
     Rule   
skipHours
     Assert   
count(hour) > 0The skipHours element should contain a least one hour element
     Rule   
skipDays
     Assert   
count(day) > 0The skipDays element should contain a least one day element
     Rule   
title|description|link
     Assert   
parent::channel or parent::image or parent::item or parent::textinput A <name path=""/> element can only be contained with a channel, image, item or textinput element.
     Report   
child::*A <name path=""/> element cannot contain sub-elements, remove any additional markup
     Rule   
name
     Assert   
parent::textinputA name element can only be contained within a textinput element
     Rule   
url
     Assert   
parent::imageA url element can only be contained within an image element
     Rule   
width
     Assert   
parent::imageA width element can only be contained within an image element
     Rule   
height
     Assert   
parent::imageA height element can only be contained within an image element
     Rule   
image
     Assert   
titleImages must have titles. The title is used for the ALT text of the image.
     Assert   
count(width) = count(height)Width and Height elements should be balanced
     Assert   
urlThis image does not have a url
     Rule   
textinput
     Assert   
titleA textinput must have a title. It is used to label the submit button for the field
     Assert   
nameA textinput must have a name. It is used to identify the input element in the form
     Assert   
linkA textinput must have a link. It is used to identify the target to which the form is sent
     Rule   
item
     Assert   
parent::channelAn item element can only occur within a channel element
     Assert   
titleYou must provide a title for this item
     Assert   
linkYou must provide a link for this item
     Rule   
width
     Assert   
preceding::height or following::heightA width should be accompanied by a height
     Rule   
height
     Assert   
preceding::width or following::widthA height should be accompanied by a width



     Pattern           

Content Validation

For documentation, please refer to http://backend.userland.com/rss091

     Rule   
language
     Assert   
string-length(.) > 0You must specify a valid language code within a language element
     Assert   
. = 'af' or . = 'sq' or . = 'eu' or . = 'be' or . = 'bg' or . = 'ca' or . = 'zh-cn' or . = 'zh-tw' or . = 'hr' or . = 'cs' or . = 'da' or . = 'nl' or . = 'nl-be' or . = 'nl-nl' or . = 'en' or . = 'en-au' or . = 'en-bz' or . = 'en-ca' or . = 'en-ie' or . = 'en-jm' or . = 'en-nz' or . = 'en-ph' or . = 'en-za' or . = 'en-tt' or . = 'en-gb' or . = 'en-us' or . = 'en-zw' or . = 'fo' or . = 'fi' or . = 'fr' or . = 'fr-be' or . = 'fr-ca' or . = 'fr-fr' or . = 'fr-lu' or . = 'fr-mc' or . = 'fr-ch' or . = 'gl' or . = 'gd' or . = 'de' or . = 'de-at' or . = 'de-de' or . = 'de-li' or . = 'de-lu' or . = 'de-ch' or . = 'el' or . = 'hu' or . = 'is' or . = 'in' or . = 'ga' or . = 'it' or . = 'it-it' or . = 'it-ch' or . = 'ja' or . = 'ko' or . = 'mk' or . = 'no' or . = 'pl' or . = 'pt' or . = 'pt-br' or . = 'pt-pt' or . = 'ro' or . = 'ro-mo' or . = 'ro-ro' or . = 'ru' or . = 'ru-mo' or . = 'ru-ru' or . = 'sr' or . = 'sk' or . = 'sl' or . = 'es' or . = 'es-ar' or . = 'es-bo' or . = 'es-cl' or . = 'es-co' or . = 'es-cr' or . = 'es-do' or . = 'es-ec' or . = 'es-sv' or . = 'es-gt' or . = 'es-hn' or . = 'es-mx' or . = 'es-ni' or . = 'es-pa' or . = 'es-py' or . = 'es-pe' or . = 'es-pr' or . = 'es-es' or . = 'es-uy' or . = 'es-ve' or . = 'sv' or . = 'sv-fi' or . = 'sv-se' or . = 'tr' or . = 'uk'Invalid language code
     Rule   
link
     Assert   
starts-with(., 'http://') or starts-with(., 'ftp://')Links should only be made to http or ftp resources.
     Rule   
skipHours
     Assert   
count(hour) < 25There is a limit of 24 hour elements within a <name path=""/> element
     Rule   
hour
     Assert   
number(.) > 0 and number(.) < 24Hour values should be in the range 0-23
     Rule   
skipDays
     Assert   
count(day) < 8There is a limit of 7 day elements within a <name path=""/> element
     Rule   
day
     Assert   
. = 'Monday' or . = 'Tuesday' or . = 'Wednesday' or . = 'Thursday' or . = 'Friday' or . = 'Saturday' or . = 'Sunday'Days should be listed as Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday
     Rule   
image
     Assert   
heightAn image height has not been supplied. A default height of 31 pixels will be assumed
     Assert   
widthAn image width has not been supplied. A default width of 88 pixels will be assumed
     Assert   
urlThis image does not have a url
     Rule   
width
     Assert   
string-length(.) > 0Width elements should not be empty
     Rule   
height
     Assert   
string-length(.) > 0Height elements should not be empty



     Pattern           

Field Lengths

For documentation, please refer to http://backend.userland.com/rss091

     Rule   
channel
     Report   
rating and ((string-length(.) < 20 or string-length(.) > 500))Supplied PICS ratings must be between 20-500 characters in length
     Rule   
link
     Assert   
string-length(.) > 1 and string-length(.) < 500Link urls must be between 1-500 characters in length.
     Rule   
width
     Assert   
number(.) < 144 and number(.) > 0Images width must be between 1-144 pixels
     Rule   
height
     Assert   
number(.) < 400 and number(.) > 0Images height must be between 1-400 pixels
     Rule   
title
     Assert   
string-length(.) > 1 and string-length(.) < 100Titles must be between 1-100 characters in length
     Rule   
description
     Report   
parent::channel and (string-length(.) = 0 or string-length(.) > 500)Channel descriptions must be between 1-500 characters in length
     Report   
parent::item and (string-length(.) = 0 or string-length(.) > 500)Item descriptions must be between 1-500 characters in length
     Report   
parent::image and (string-length(.) = 0 or string-length(.) > 100)Image descriptions must be between 1-100 characters in length
     Report   
parent::textinput and (string-length(.) = 0 or string-length(.) > 500)Textinput descriptions must be between 1-500 characters in length
     Rule   
copyright|pubDate|lastBuildDate|managingEditor|webMaster
     Assert   
string-length(.) > 1 and string-length(.) < 100<name path=""/> elements must be between 1-100 characters in length
     Rule   
url
     Assert   
string-length(.) > 0url elements must not be empty




Schematron Pretty by Rick Jelliffe. The Schematron by Rick Jelliffe, Academia Sinica Computing Centre.