Several problems were there:
1) The MIME type for XSL has to be configured on the server:
AddType application/xml .xsl
2) Firefox does not support document.write() JavaScript calls during XSLT transformations. I have commented these calls.
3) For security reasons, Mozilla wants the XML and the XSLT styleshets to be from the same domain. I have not done the test with different domains, but you will probably have to copy the XSLT stylesheets on your server.
Google Sitemaps Stylesheets is available under the terms of the GNU Lesser General Public License (GNU/LPL).
Reminder about this license:
- Copyright notice must be attached
- You can modify the code
- You can create derivative works
- You can ask money for your derivative works
- You can distribute your works in binary
Are you using Firefox? For security reasons, Mozilla wants the XML and the XSLT styleshets to be from the same domain. So, you have to copy the stylesheets on your server and to put the following references:
1) For your Google sitemap index file, add the following line:
<?xml-stylesheet type="text/xsl" href="siteindex.xsl"?>
2) For your Googles sitemap files, add the following line:
<?xml-stylesheet type="text/xsl" href="sitemap.xsl"?>
Advantage of several sitemaps:
- Current reason: handled by hand for the moment. It will changed ASAP.
- Human readability for controls by the webmaster
- Google recommends to use several sitemaps if we anticipate the sitemap growing beyond 50,000 URLs or 10MB
This is wonderful, I'll integrate this into the upcomming phpSitemapNG "kiting" release!
Am I allowed to remove your logo that you've added to the upper right corner? There are some stylesheet problems with the logos and text - the images are over the text, so it's hard to read them.
Bonsoir Serge! (that's about the extent of my french :-))
Just to complete the tour-d'europe, I did a swiss version of your style sheet. I've actually been waiting for a style sheet, it's a wonder nobody else has done one, thanks!
Here's my version / variation (with a sample file, just for the sitemap-file, index-files would be similar):
http://gsitecrawler.com/articles/xsl1/sample.xml
and the files themselves:
http://gsitecrawler.com/articles/xsl1/gs-jm.xsl
http://gsitecrawler.com/articles/xsl1/gs-jm.css
http://gsitecrawler.com/articles/xsl1/gs-jm.js
Some of the things I did:
- add client-side sorting of the data via javascript
- clean up some css, other small stuff
Yes, I'll release it also under LGPL, I'll add the information in the file tomorrow.
"... because it also works with Firefox"? I'm impressed that it also works in the Internet Explorer :-))). I only tried it in IE6 and FF, so I'm not sure how it will handle in Opera + co. but I imagine it will also work there as well. I'm not sure about Tobias's comment regarding the images, I at least didn't notice any problems, but I know he's more experienced with xml/xsl than I will ever be.
Perhaps a good idea would be to concentrate it all (CSS + JS) into the XSL template. I imagine that should work and cause less problems.
Do you see any way to keep the current version on a central server for Firefox? It would be great to be able to do that (everyone could have a current-version instead of the old version they downloaded), but I know that FF regards that as a security issue... Perhaps server-based? Tobias, do you have some time leftover? :D
I have uploaded the sitemap.xml file to my css folder (at http://ibchem.com/css) I have inclued the line that you have written above... as the second line of my sitemap.xml file but I keep getting the error..
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
1) the xsl file (+ css if still needed) MUST be in the SAME directory as the sitemap file. It can't be in /css, it must be in /.
2) It won't work for compressed sitemap files (.xml.gz) - you need to keep an uncompressed version to make sure it works. You can however, still just submit the compressed version to google, the uncompressed version is only for viewing it yourself (or easier: copy the files locally into a directory on your PC instead of the server)
Hello Tobias. Thank you for your work. I have done the cleanup in the gss.xsl file.
I'm not sure it is a good idea to put everything (CSS and JavaScript) into the XSLT file. Especially, we will have some troubles with & characters used in the gss.js and that should be encoded as & in gss.xsl. We will loose readability.
Your 'http://www.ibchem.com/sitemap/sitemap.xsl' file is not valid. It contains a lot of '-' characters due to a save from IE I guess.
You should take the new gss.xsl file from here: http://www.baccoubonneville.com/gss.xsl but use right click "Save target under..." to save the file properly.
You should be able to see the file by typing 'http://www.ibchem.com/sitemap/sitemap.xsl' in - let say - IE.
Google Sitemaps Stylesheet is now under sourceForge.net: http://sourceforge.net/projects/gstoolbox/. Of course, you can join if you want! I will put the source code under CVS ASAP.
I have done the change about the logo. It's working for my demo.
I have seen your documentation. It's clear. Can I reproduce the documentation on http://gstoolbox.sourceforge.net/, (not yet available) the official home page of the project?
Yeah, you can if you want. Should I release this documentation under a free documentation license? Do you know a good?
I'll use the SF forum up from now, this is a good idea. :)
Download is available using SourceForge.net (follow the link in the article). Current downloadable version is 1.4. No new version has been published for a while.
I'm using v3, and the formatting from http://sourceforge.net/project/showfiles.php?group_id=146526&package_id=161545&release_id=351493
and put it together as a zip at
http://thatsnowsthegoat.com/wp-content/uploads/sitemap-3.0b1.wp2_human_readable.zip
You can see how it looks at http://thatsnowsthegoat.com/sitemap.xml
I have a newer version of the file online at http://gsitecrawler.com/gss.xsl -- it uses the new sitemaps.org 0.9 namespace (the wrong namespace will lead to an empty listing).
I would like to construct an XML DTD to create an external entity reference in an attribute value. Anyone who could explain me how and if thats possible
on my site but for some reason this messes up the table structure. What needs to be done to get this change to work?
Also, the copyright notice was layed out using tables. I think it is more appropriate to use CSS to create a centered div instead.
Lastly, your table headers are given as a <td> with a classname "header". I think it might be better to use the <th> tag instead, because that's what it's for.
I believe Yahoo and - maybe - MS are now also reading sitemaps. Would it be possible to do an updated version of gss.xsl which is Google-independent? In particular not using the Google css reference (http://www.google.com/webmasters/sitemaps/docs/sitemaps.css") and the generic http://www.sitemaps.org/schemas/sitemap/0.9 definition.
The Google css file no longer exists. An alternative is available: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/gsitemap/gss/gss.css?revision=1.1.4.3&content-type=text%2Fplain&pathrev=DRUPAL-5--2
Hi!
I have test to install release 1.4 but i have received some error, for this reason i have test to install 1.5beta and now work fine! :-)
Really compliment for this great work and sorry for my bad english :-(
I have also download and save to my server css file from: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/gsitemap/gss/gss.css?revision=1.1.4.3&content-type=text%2Fplain&pathrev=DRUPAL-5--2
(and i have edit gss.xsl to point to new css) and now all work perfectly!
Test: http://darkwolf.altervista.org/sitemap.xml
New questions!
now i have make a siteindex (like this of this site) and i have installed and edit wordpress plugin to update and maintain blog_sitemap.xml.
All is perfect but:
1: Can i send all my sitemap and also siteindex to google webmaster tool?
2: Can i insert all sitemap (and also siteindex) to robots.txt?
-
This is my actually robots: http://darkwolf.altervista.org/robots.txt
And this is structure of google sitemap tools:
blog_sitemap.xml - forum_sitemap.xml - index_sitemap.xml - pyg_sitemap.xml - rtech_sitemap.xml - sitemap.xml
Is ok?
thanks in advance :)
Hello,
Here is slightly modified version of yor gss.xsl file for Google Geo Sitemap:
http://darz-bor.info/gss_geo.xsl
and an example sitemap:
http://darz-bor.info/sitemap_geo.xml
Thanks for the note above about using the new sitemaps.org 0.9 namespace! I was receiving a blank screen when trying to view my sitemap, even though looking at the browser source code showed all the URLs present.
As soon as I changed to this statement in gss.xsl: xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
I would like to construct an XML DTD to create an external entity reference in an attribute value. Anyone who could explain me how and if thats possible
For security reasons, Mozilla wants the XML and the XSLT styleshets to be from the same domain. So, you have to copy the stylesheets on your server and to put the following references: Anyone who could explain me how and if thats possible ,
http://www.cyberdesignz.com/ , you can get more information from this
Am I allowed to remove your logo that you've added to the upper right corner? There are some stylesheet problems with the logos and text - the images are over the text, so it's hard to read them.