rdf2gsm:RDF to Google Sitemap xslt

xslt, xml

17:13:21, by dozo Email , 137 words, 2873 views   Japanese (JP) del.icio.us

I think it is convenience if you use google sitemap for your blog site.
Because Google Sitemap use very severe parser for rss (RDF, RSS2.0, atom).
If we have a problem rss on your blogs then It output parser error.
Google Sitemap Protocol is very simple. It is comprise url and date.
I think there is no errors on your google sitemap.

rss1.0
rdf2gsm.xslt

rss2.0
rdf2gsm.xslt


For example:
PHP4
(require xslt module)
$xsl_filename = "rdf2gsm.xslt";
$xml_filename = "rdffile.xml";

$xmldoc = domxml_open_file( $xml_filename );
$xsldoc = domxml_xslt_stylesheet_file ( $xsl_filename );
$result = $xsldoc->process($xmldoc);
print $result->dump_mem();

PHP5

$xsl_filename = "rdf2gsm.xslt";
$xml_filename = "rdffile.xml";

$doc = new DOMDocument();
$xsl = new XSLTProcessor();

$doc->load($xsl_filename);
$xsl->importStyleSheet($doc);

$doc->load($xml_filename);
echo $xsl->transformToXML($doc);

Trackback address for this post:

http://hain.jp/htsrv/trackback.php/52

Comments, Trackbacks:

No Comments/Trackbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

powered by b2evolution

shinobi

Neighbors
Relative
Favorites
PR

Archives
スポンサー

Latest bookmark
Search

Categories

Who's Online?
Misc
Syndicate this blog XML

Valid XHTML 1.0! Valid CSS! Valid RSS 2.0! Valid Atom 1.0!