Thursday, 3rd July 2003
RDF and PHP
If you’re still struggling to get to grips with what RDF is actually for, you could do worse than read this guide to Parsing FOAF with PHP. It shows how the FOAF flavour of RDF can be processed using the PHP RAP library, and in doing so demonstrates how RDF documents are built from collections of triples anmd how these triples can be queried to extract useful information. If you’ve ever used Prolog, RDF is actually a very similar concept.
Accessing cookies with application/xml+xhtml
I’m completely stuck on this one. When serving XHTML documents to Mozilla as application/xml+xhtml
, the available DOM is for an XML document rather than an HTML document. This means it’s missing the document.cookie object normally used to access cookies from Javascript. I can’t figure out how you access cookies without it (I’ve searched Bugzilla to no avail). Anyone got any ideas? I sure wish the Mozilla project provided better documentation on this stuff.