#
# This is a Relax NG Compact Syntax schema for the sitemaps protocol
# plus the following extensions defined by Google: news, video,
# code, images, mobile, geo.
#
# An example sitemap: http://www.groks.org/sitemaps-template.xml
#
# Use Emacs nxml-mode to with this schema for validation:
#
# ~/.schemas/schemas.xml:
#
#
#
#
#
#
#
#
#
#
#
#
#
# Time-stamp: "2010-09-18 13:05:33"
# Location: http://www.groks.org/sitemaps.rnc
# Author: Stephen Deasey http://www.groks.org/yo
#
# Sitemaps documenation:
#
# http://www.sitemaps.org/protocol.php
#
# Google News Sitemaps extension:
#
# http://www.google.com/support/webmasters/bin/answer.py?answer=42738
#
# Google Video Sitemaps extension:
#
# http://www.google.com/support/webmasters/bin/answer.py?answer=80472
#
# Google Codesearch Sitemap extension:
#
# http://www.google.com/support/webmasters/bin/answer.py?answer=75224
#
# Google Image Information extension:
#
# http://www.google.com/support/webmasters/bin/answer.py?answer=178636
#
# Google Geo Sitemaps extension:
#
# http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=94555
#
# Google Mobile Sitemaps extension:
#
# http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=34648
#
default namespace sitemap = "http://www.sitemaps.org/schemas/sitemap/0.9"
namespace news = "http://www.google.com/schemas/sitemap-news/0.9"
namespace video = "http://www.google.com/schemas/sitemap-video/1.0"
namespace codesearch = "http://www.google.com/codesearch/schemas/sitemap/1.0"
namespace image = "http://www.google.com/schemas/sitemap-image/1.1"
namespace geo = "http://www.google.com/geo/schemas/sitemap/1.0"
namespace mobile = "http://www.google.com/schemas/sitemap-mobile/1.0"
namespace local = ""
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
start = urlset | sitemapindex
## Container for a set of up to 50,000 document elements.
urlset = element sitemap:urlset { urlset-content }
urlset-content =
url+
## Container for a set of up to 1,000 sitemap URLs.
sitemapindex = element sitemap:sitemapindex { sitemapindex-content }
sitemapindex-content =
sitemap+
## Container for the data needed to describe a document to crawl.
url = element sitemap:url { url-content }
url-content =
loc
& lastmod?
& changefreq?
& priority?
& ( news | video | codesearch | image* | geo | mobile )?
## Container for the data needed to describe a sitemap.
sitemap = element sitemap:sitemap { foreign-attributes*, sitemap-content }
sitemap-content =
loc
& lastmod?
& foreign-nodes*
## The location URI of a document.
loc = element sitemap:loc {
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
## The date the URL was last modified.
lastmod = element sitemap:lastmod {
( xsd:date | xsd:dateTime )
}
## The frequency that a URL is likely to change.
changefreq = element sitemap:changefreq {
( string "always"
| string "hourly"
| string "daily"
| string "weekly"
| string "monthly"
| string "yearly"
| string "never" )
}
## The priority of a URL relative to others on the same site. The default is 0.5.
priority = element sitemap:priority {
xsd:decimal { minInclusive="0.0" maxInclusive="1.0" }
}
##
news = element news:news { news-content }
news-content =
news-publication-date
& news-keywords?
& news-stock-tickers?
## Article publication date in W3C format, preferably including a timestamp.
## If you don't include this field in your Sitemap file, the page itself
## must include an extractable date. It is very important that Google News
## correctly understand the publication date of this article. If the sitemap
## file doesn't include a date for the article, and the article itself doesn't
## have an extractable date, the article won't be included in Google News
## and you'll see a "Date not found" error for the article on the News Crawl
## errors page in webmaster tools.
news-publication-date = element news:publication_date {
( xsd:dateTime | xsd:date )
}
## A comma-separated list of keywords describing the content of the article.
## Keywords may be drawn from, but are not limited to, the list of existing
## Google News categories.
news-keywords = element news:keywords {
xsd:string
}
## A comma-separated list of stock tickers of the companies, mutual funds, or
## other financial entities that are the main subject of the article. Relevant
## primarily for business articles. Each ticker may optionally be prefixed by
## the name of its stock exchange, e.g., "NYSE:HD".
news-stock-tickers = element news:stock_tickers {
xsd:string
}
##
video = element video:video { video-content }
video-content =
video-thumbnail-loc
& video-title
& video-description
& ( (video-content-loc & (video-player-loc & video-content-segment-loc*))
| video-content-loc
| (video-player-loc & video-content-segment-loc*) )
& video-gallery-loc?
& video-duration?
& video-rating?
& video-view-count?
& video-publication-date?
& video-expiration-date?
& video-tag*
& video-category?
& video-restriction?
& video-family-friendly?
& video-requires-subscription?
& video-price*
& video-uploader?
## The URL of the actual video content.
video-content-loc = element video:content_loc {
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
## A URL pointing to a player for the video. The most common case for this
## is with Flash video. The URL of the SWF file that plays your video
## should be specified in and the URL of the FLV
## (actual video file) would be specified in .
##
## The required attribute allow_embed specifies whether Google can embed
## the video in the search results on http://video.google.com.
video-player-loc = element video:player_loc {
attribute allow_embed { "Yes" | "No" | "yes" | "no" }?,
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
## A URL pointing to the URL for the video thumbnail image file. If you
## don't provide a thumbnail image, Google will automatically generate
## a set of representative thumbnail images from your actual video
## content. Using this allows you to suggest the thumbnail you want
## displayed in search results.
video-thumbnail-loc = element video:thumbnail_loc {
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
## A link to the gallery (collection of videos) in which this video
## appears. Only one tag can be listed for each
## video. The value of the optional attribute title indicates the
## title of the gallery.
video-gallery-loc = element video:gallery_loc {
attribute title { xsd:string },
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
## Note: Use only in conjunction
## with . If you publish your video as a series
## of raw videos (for example, if you submit a full movie as a
## continuous series of shorter clips), you can use the
## to supply us with a series of URLs, in
## the order in which they should be concatenated to recreate the video
## in its entirety. Each URL should point to a .mpg, .mpeg, .mp4, .m4v,
## .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, or other video file
## format. It should not point to any Flash content. The value of the
## optional attribute duration specifies the length of each clip in seconds.
video-content-segment-loc = element video:content_segment_loc {
attribute duration { xsd:nonNegativeInteger { minInclusive="1" } }?,
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
## The title of the video.
video-title = element video:title {
xsd:string { minLength="1" maxLength="100" }
}
## The description of the video.
video-description = element video:description {
xsd:string { minLength="1" maxLength="2048" }
}
## The rating of the video. The value must be float number in the range 0.0-5.0.
video-rating = element video:rating {
xsd:decimal { minInclusive="0.0" maxInclusive="5.0" }
}
## The number of times the video has been viewed.
video-view-count = element video:view_count {
xsd:nonNegativeInteger
}
## The date the video was first published, in W3C format. Acceptable values are
## complete date (YYYY-MM-DD) and complete date plus hours, minutes and seconds,
## and timezone (YYYY-MM-DDThh:mm:ss+TZD). For example,
## 2007-07-16T19:20:30+08:00.
video-publication-date = element video:publication_date {
( xsd:date | xsd:dateTime )
}
## The date after which the video will no longer be available, in W3C format.in
## W3C format. Acceptable values are complete date (YYYY-MM-DD) and complete
## date plus hours, minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD).
## For example, 2007-07-16T19:20:30+08:00 Don't supply this information if your
## video does not expire.
video-expiration-date = element video:expiration_date {
( xsd:date | xsd:dateTime )
}
## A tag associated with the video. Tags are generally very short descriptions
## of key concepts associated with a video or piece of content. A single video
## could have several tags, although it might belong to only one category.
## For example, a video about grilling food may belong in the Grilling category,
## but could be tagged "steak", "meat", "summer", and "outdoor". Create a new
## element for each tag associated with a video. A maximum of 32
## tags is permitted.
video-tag = element video:tag {
xsd:string { minLength="1" maxLength="256" }
}
## The video's category. For example, cooking. The value should be a string no
## longer than 256 characters. In general, categories are broad groupings of
## content by subject. Usually a video will belong to a single category.
## For example, a site about cooking could have categories for Broiling, Baking,
## and Grilling.
video-category = element video:category {
xsd:string { minLength="1" maxLength="256" }
}
## A list of countries where the video may or may not be played, in
## space-delimited ISO 3166 format. The required attribute “relationship”
## specifies whether the video is restricted or permitted for the specified
## countries. Allowed values are allow or deny. Only one tag
## can appear for each video. If there is no tag, it is
## assumed that the video can be played in all territories.
video-restriction = element video:restriction {
attribute relationship { "allow" | "deny" },
list { (xsd:string { pattern="[A-Z][A-Z]" })+ }
}
## Whether the video is suitable for viewing by children.
video-family-friendly = element video:family_friendly {
( "Yes" | "No" | "yes" | "no" )
}
## The duration of the video in seconds.
video-duration = element video:duration {
xsd:nonNegativeInteger { maxInclusive="28800" }
}
## The price to download or view the video. The required attribute currency
## specifies the currency in ISO 4217 format. More than one
## element can be listed (for example, in order to specify various currencies).
video-price = element video:price {
attribute currency { xsd:string { pattern="[A-Z][A-Z][A-Z]" } },
xsd:decimal
}
## Indicates whether a subscription (either paid or free) is required to view
## the video. Allowed values are yes or no.
video-requires-subscription = element video:requires_subscription {
( "Yes" | "No" | "yes" | "no" )
}
## A name or handle of the video’s uploader. Only one is
## allowed per video. The optional attribute info specifies the URL of a
## webpage with additional information about this uploader. This URL must
## be on the same domain as the tag.
video-uploader = element video:uploader {
attribute info { xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" } }?,
xsd:string { minLength="1" maxLength="100" }
}
##
codesearch = element codesearch:codesearch { codesearch-content }
codesearch-content =
( ( package-filetype & packagemap? ) | ( package-filetype & packageurl? ) )
& package-license?
& package-filename?
## Case-insensitive. The value "archive" indicates that the file is an archive
## file. For source code files, the value defines the the source code
## language. Examples include "C", "Python", "C#", "Java", "Vim". For source
## code language, the Short Name, as specified in the list of supported
## languages, must be used. The value must be printable ASCII characters, and
## no white space is allowed.
##
## Only supported languages will be indexed. If the language of your code is
## not yet supported, you can still submit the Sitemap and Google may index
## your code in the future.
##
## Supported languages: http://www.google.com/support/webmasters/bin/answer.py?answer=75252
##
package-filetype = element codesearch:filetype { package-filetype-content }
package-filetype-content =
( "archive" | any-package-filetype )
any-package-filetype =
xsd:string { minLength="1" }
## Case-insensitive. The name of the software license. For archive files, this
## indicates the default license for files in the archive. Examples include
## "GPL", "BSD", "Python", "disclaimer". You must use the Short Name, as
## specified in the list of supported licenses.
##
## When the value is not one of the recognized licenses, this will cause us to
## index the item as "unknown license".
##
## Supported licenses: http://www.google.com/support/webmasters/bin/answer.py?answer=75256
##
package-license = element codesearch:license { package-license-content }
package-license-content =
supported-package-license
supported-package-license =
( "aladdin" | "artistic" | "apache" | "apple" | "bsd"
| "cpl" | "gpl" | "lgpl" | "disclaimer" | "ibm"
| "lucent" | "mit" | "mozilla" | "nasa" | "python"
| "qpl" | "sleepycat" | "zope" )
unknown-package-license =
xsd:string { minLength="1" } - xsd:string { pattern=" " }
## The name of the actual file. This is useful if the URL ends in something
## like download.php?id=1234 instead of the actual filename. The name can
## contain any character except "/". If the file is an archive file, it will
## be indexed only if it has one of the supported archive suffixes.
##
## Supported archive suffixes: http://www.google.com/support/webmasters/bin/answer.py?answer=75259
##
package-filename = element codesearch:filename {
xsd:string { minLength="1" } - xsd:string { pattern="/" }
}
## For use only when the value of codesearch:filetype is not "archive". The
## URL truncated at the top-level directory for the package. For example, the
## file http://path/Foo/1.23/bar/file.c could have the package URL
## http://path/Foo/1.23. All files in a package should have the same
## packageurl. This tells us which files belong together.
packageurl = element codesearch:packageurl {
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
## Case-sensitive. For use only when codesearch:filetype is "archive". The name
## of the packagemap file inside the archive. Just like a Sitemap is a list of
## files on a web site, a packagemap is a list of files in a package.
##
## Prefer PACKAGEMAP.xml
packagemap = element codesearch:packagemap {
xsd:string { minLength="1" }
}
##
image = element image:image { image-content }
image-content =
image-loc
& image-title?
& image-caption?
& image-license?
& image-geo-location?
image-loc = element image:loc {
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
image-title = element image:title {
xsd:string { minLength="1" maxLength="2048" }
}
image-caption = element image:caption {
xsd:string { minLength="1" maxLength="2048" }
}
image-license = element image:license {
xsd:anyURI { minLength="12" maxLength="2048" pattern="https?://.+" }
}
image-geo-location = element image:geo_location {
xsd:string { minLength="2" maxLength="1000" }
}
## Geo sitemaps.
geo = element geo:geo { geo-content }
geo-content =
geo-format
geo-format = element geo:format {
supported-geo-formats
}
supported-geo-formats = ( "kml" | "kmz" | "georss" )
##
mobile = element mobile:mobile { empty }
##
foreign-nodes =
foreign-attributes*
| foreign-elements*
foreign-attributes =
attribute * - (local:* | sitemap:* | news:* | video:* | codesearch:* | image:* ) { text }*
foreign-elements =
element * - (local:* | sitemap:* | news:* | video:* | codesearch:* | image:* ) { anything* }
anything =
attribute * { text }
| element * { anything* }
| text