Page 1 of 1

event google sitemap - add a kml file

Posted: Thu Jul 03, 2008 4:19 pm
by konus
Hello,
I would like to ask for help with the event google sitemap plugin:

I have created a kml-file with geocoded blog articles (description of playgrounds in Dresden). Now I would like to add the kml file to the google sitemap in the following way:

Code: Select all

...
    <url>      
      <loc>http://www.example.com/example1.kml</loc>
      <geo:geo>
        <geo:format>kml</geo:format>
      </geo:geo>
    </url> 
...
How could I add the information manually (in the source-code) before the sitemap gets generated and compressed?

Additionally question: is there a general public interest to enhance the sitemap-plugin in a way, a normal user could add (static) links to the sitemap in plugin administration? (I would file a feature request in this case, because I can not do it by myself :-))

Re: event google sitemap - add a kml file

Posted: Thu Jul 03, 2008 4:31 pm
by garvinhicking
Hi!

With the current code, it is impossible to do. There is no place for adding manual snippets to it.

The best way would be to modify the plugin to offer a large textarea into which one could add custom content.

I've just added this feature, bumping the version to 0.40, that should get available on spartacus within the next 48 hours. Download manually from SourceForge ViewCVS, if you want to try it earlier.

Best regards,
Garvin

Posted: Fri Jul 04, 2008 12:02 am
by konus
It works, You made me happy! :D :D :D

I have one more issue. I just found out, that I have to add a line at the top to declare the new namespace for geo schemes. I am not sure but think, this can't be done below the urlset section, but only within the urlset opening tag? It should look like:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
  <urlset xmlns="http://www.sitemaps.org/schemes/sitemap/0.9"
	       xmlns:geo="http://www.google.com/geo/schemas/sitemap/1.0">
    <url>      
      <loc>http://www.example.com/example1.kml</loc>
      <geo:geo>
        <geo:format>kml</geo:format>
      </geo:geo>
    </url> 
  </urlset>
Would it be possible (and reasonable in terms of usability) to add a second custom field for new namespaces as well?

Posted: Fri Jul 04, 2008 9:42 am
by garvinhicking
Hi!

I believe adding a second input field is the best way for this, yes. Just committed that.

Regards,
Garvin

Posted: Fri Jul 04, 2008 2:55 pm
by konus
Thank you for the really fast replay, I would like to give some feedback: The text in the second custom input field is added immediately after the last entry http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd I had to enter quotation marks, enter, (tab) and then my custom text, like this:
to get an xml valid file. I would suggest, that adding the quotation mark and the new line would be done within the program. Or could there be a reason not to do so?

Posted: Fri Jul 04, 2008 3:05 pm
by garvinhicking
Hi!

Thakns for noticing! The quotation mark was indeed placed wrongly, sorry for that.

As for the newline: This is not required, so I just changed the code only in the way that the quotation mark is placed properly.

Best regards,
Garvin

Posted: Fri Jul 04, 2008 4:05 pm
by konus
I would really like to say thank you! I really appreciate your help, it is always so fast and satisfying! I am a beginner and this helps me a lot.

With your modification, I created the new sitemap, with the added geo-content. I found out, that the sitemap is still not valid. It is because the referenced xml namespace file (http://
www.google.com/geo/schemas/sitemap/1.0) does not exist despite the
fact that google publishedit. In this threat, a employee of google points out, that it is important, not to mix a geositemap with a normal sitemap. He strongly adviced to send two different sitemaps in, one with geocontent and the other one with the normal link stuff.

I am a bit ashamed, because of all the effort. Sometimes the easiest solution is so hard to imagine: I have now created a new file called geositemap.xml and configurated the sitemap plugin to send both of them to google

Code: Select all

http://www.google.com/webmasters/tools/ping?sitemap=http://www.dd4kids.de/geositemap.xml;http://www.google.com/webmasters/tools/ping?sitemap=%s
I am sorry, I didn't found out earlier.

Posted: Fri Jul 04, 2008 4:14 pm
by garvinhicking
Hi!

Hm, what a pitty. Is absolute validation really required for that file? If I knew some XSD, one could easily create his own namespace, defining the variables that are required, and referencing his own Schema URL.

I believe that google surely will put up the missing namespec soon?

Still I think this addition is good for the future. :)

Best regards,
Garvin