Appendix II. Sitemap file specification

Estimated reading time: 1 minute

A sitemap file which lists files (such as images, videos, JavaScript, CSS etc.) used in an HTML file should be downloaded and is required for HTML download. Only files listed in the sitemap are downloaded. The format of a sitemap is XML defined by http://www.sitemaps.org/index.html.

This section describes this sitemap file specification for HTML download in BRAVIA Signage.

Path name of sitemap file

The name of a sitemap file must be “sitemap.xml” and must be located on the same or higher path as an URL of HTML specified in a playlist.

e.g.

  • URL of HTML:
  • http://www.example.com/app/index.html

  • URL of sitemap (Either one is allowed):
  • http://www.example.com/app/sitemap.xml
  • http://www.example.com/sitemap.xml

Tag name defined in sitemap file

The following are XML tags used for HTML download in BRAVIA Signage.

Tag name Parent Tag Descriptions
urlset - Required Root tag. Set the following value as "xmlns".
"http://www.sitemaps.org/schemas/sitemap/0.9"
url urlset Required Parent tag of downloaded URL
loc url Required downloaded URL

URLs listed in a sitemap must be of the same scheme and same or lower path as the URL of a sitemap.

e.g.

  • URL of sitemap:
  • http://www.example.com/app1/sitemap.xml

  • Valid URLs in sitemap:
  • http://www.example.com/app1/app1.js
  • http://www.example.com/app1/image/image.jpg

  • Invalid URLs in sitemap:
  • http://www.example.com/app2/app2.js
  • http://www.example.com/style.css
  • https://www.example.com/app1/app1.js

Example of sitemap file

The following are examples which can be used for HTML download in BRAVIA Signage. The following example of the sitemap.xml is included in the installer package.

e.g. Example of sitemap.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
      <url>
        <loc>http://www.example.com/app/video/video.mp4</loc>
      </url>
      <url>
        <loc>http://www.example.com/app/main.js</loc>
      </url>
      <url>
        <loc>http://www.example.com/app/style.css</loc>
      </url>
    </urlset>

Others

  • Use a relative path to specify an image file, a video file, JavaScript file, CSS file, etc. A file specified by URL such as “http://” or “https://” is obtained not from the downloaded file, but through the network directory.