The basic concept is the nesting of tags to indicate subordination of pages. If your website has a home page, plus two (subordinate) pages, the outline of your sitemap would be something like this:
<item name="Home Page" ... >
<item name="Page 1" ... />
<item name="Page 2" ... />
</item>This is certainly one of the coolest features introduced by Standard-Navigation. The idea is to keep important links in the very same place, making them easier for the user to spot. These role’s are defined:
Each of these role’s may appear several times in the sitemap (e.g. if the site has multiple contact pages). In this case a sub-menu pops up (containing the name-attributes of the <item>’s) when the user clicks. We indicate this by showing the usual triangle symbol under the icon.
| Tag | Mandatory Attributes | Optional Attributes | Parent Elements | Child Elements | Structural Meaning | Displays as (in our Firefox extension) | Terminology |
|---|---|---|---|---|---|---|---|
| sitemap | baseurl xmlns |
lang type charset target |
— | image style group item external |
Root element | — | |
| image | — | url type width height |
sitemap | variant | Image associated to the website | Logo (=link to home page) If multiple <variant>’s are given, the browser selects the one which fits best into the available space (according to width- & height-declaration). But what happens, if no <image> is given? See Discussion Maximum size for our sidebar: about 200 x 200 Maximum size for our toolbar: about 20 x 100 |
as in RSS more readable than HTML’s <img> |
| style | url type |
replace | sitemap | — | — | Stylesheet to be loaded when sidebar/toolbar is shown | as in HTML |
| group | — | name relation description priority target lang type baseurl charset |
sitemap group item |
group item variant external |
Group several items logically to:
|
Frame/separator around its embedded objects. If name is given, we show it as a heading. |
|
| item | url (may be omitted if declared in subordinate <item>’s or <variant>’s) name (may be omitted if declared in subordinate <variant>’s) |
description role priority target lang type baseurl charset method |
sitemap |
group item variant external |
A navigable (“clickable”) item | Entry in the pages’ list | as in RSS |
| variant | url(may be omitted if already declared in superordinate <item>, or if superordinate element is <group>) name (may be omitted if already declared in superordinate <item>, or if superordinate element is <image>) |
description lang type charset width height |
image group item |
— | A variant (i.e. version) of its superordinate element | As its superordinate <image>, <group> or <item> | as in HTTP’s RFC 2616 |
| external | url | baseurl lang type charset priority target |
sitemap group item |
— | — | Includes another sitemap file. Namely on the very place in the hierarchy at which the <external> element lives. Note: The only purpose of the optional attributes is to pass them on to the content of the external sitemap. |
|
| externalsitemap | — | baseurl lang type charset target |
— | group item variant external |
Root element of a sub-sitemap | — |
| Attribute | Allowed in Tags | Explanation | Allowed Values | Terminology |
|---|---|---|---|---|
| baseurl | sitemap group item |
|
as per RFC 2396 & RFC 2732 | |
| charset | sitemap group item variant |
Character set of the referenced object. (The character set of the sitemap file itself is declared in the very first line as an attribute of the XML prologue: encoding="utf-8") |
as per IANA’s Character Sets | as in HTML |
| description | image group item variant |
Longer description which appears in the tooltip when user MouseOvers the object | any string | as in RSS; describes the attribute’s purpose better than HTML’s "alt" or "title" |
| height | image variant |
Height in pixels. | integer from 1 to 1000 | as in HTML |
| lang | sitemap group item variant |
Language of the referenced object. | as per RFC 3066 | as in HTML |
| method | item | Method to submit the search form. (Only allowed if role="search"). |
|
as in HTML |
| name | group item variant |
Name which appears in the sidebar/toolbar | any string | as in HTML |
| priority | group item |
Denotes the importance of an object, relative to the rest. Default is 0.5 | decimal number from 0.0 to 1.0 | analogous to sitemaps.org |
| relation | group | Declare a linear sequence of several pages (e.g. Bugzilla Guide). In this case, the previous/next arrows in the Firefox Extension (shortcut toolbar) are shown. |
|
|
| replace | style | URL of the CSS file which is to be deactivated. | as per RFC 2396 & RFC 2732 | |
| role | item | Causes the object to be displayed in the shortcut toolbar, not in the normal hierarchy. If several role’s are located on the same page, they have to be declared as anchors and entered separately into the sitemap. |
|
"role", "contentinfo" & "search": as in the draft for XHTML 2.0 |
| target | sitemap group item |
Declaration of the target frame (for web sites using frame sets). | any string (without blanks), except "_blank" | as in HTML |
| type | sitemap image style group item variant |
MIME type of the referenced object. | as per IANA’s MIME Media Types | as in HTML |
| url | image style item variant external |
If this is no complete URL (e.g. "files/logo.gif"), the BaseURL will be prefixed. Anchors are allowed as URL’s. | as per RFC 2396 & RFC 2732 | more consistent than HTML’s "href" & "src" |
| width | image variant |
Width in pixels. | integer from 1 to 1000 | as in HTML |
| xmlns | sitemap | XML namespace. At the same time declaration of the file format version plus URL to the specifications. | http://www.standard-sitemap.org/ version1beta/ |
as in XHTML |
XML requires the following special characters to be escaped:
| Character | Escape Code | Remarks | |
|---|---|---|---|
| Ampersand | & | & | |
| Less Than | < | < | |
| Greater Than | > | > | |
| Single Quote | ' | ' | not needed if you use double quotes as text delimiters |
| Double Quote | " | " | not needed if you use single quotes as text delimiters |
URLs containing an & need to be escaped, see the FAQ entry.