Sitemap extension
I have a site containing a sitemap.xml file. Currently, sitemap.xml is as follows:
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.mysite.com/about/blog/post-1</loc>
<lastmod>2013-08-13</lastmod>
<changefreq>never</changefreq>
<blog:title>This is the title of the blog post</blog:title>
<blog:description>This is the description of the blog post</blog:description>
<blog:author>Some person</blog:author>
<blog:authorUrl>https://www.mysite.com/people/some-person</blog:authorUrl>
</url>
</urlset>
As my snippet above shows, I am trying to expand my Sitemap. I use the approach detailed at sitemaps.org in the sitemaps protocol extension .
I created a .xsd file called blog.xsd. This file is located at http://www.mysite.com/data/blog.xsd . This file is as follows:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="title">
<xs:restriction base="xs:string" />
</xs:simpleType>
<xs:simpleType name="description">
<xs:restriction base="xs:string" />
</xs:simpleType>
<xs:simpleType name="author">
<xs:restriction base="xs:string" />
</xs:simpleType>
<xs:simpleType name="authorUrl">
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:schema>
, blog.xsd Sitemap. Google - sitemap.xml . : " . ". , , authorUrl. , , sitemap.xml blog.xsd. , . - ? sitemaps.org . !
, XML ; .
:
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:example="http://www.example.com/schemas/example_schema"> <!-- namespace extension -->
, xmlns:example="http://www.example.com/schemas/example_schema", .
URL- . URL, . http://www.mysite.com/data/blog/1.0 - - .
Sitemap :
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:blog="http://www.mysite.com/data/blog/1.0">
<url>
<loc>http://www.mysite.com/about/blog/post-1</loc>
<lastmod>2013-08-13</lastmod>
<changefreq>never</changefreq>
<blog:title>This is the title of the blog post</blog:title>
<blog:description>This is the description of the blog post</blog:description>
<blog:author>Some person</blog:author>
<blog:authorUrl>https://www.mysite.com/people/some-person</blog:authorUrl>
</url>
</urlset>
, .
XML- sitemap XML-, <urlset :
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:blog="http://www.mysite.com/data/blog/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
http://www.mysite.com/data/blog/1.0
http://www.mysite.com/data/blog.xsd">