XML_GRDDL - ideas and feedback sought (Microformats/Semantic web)

From: Date: Sat, 01 Mar 2008 03:20:58 +0000
Subject: XML_GRDDL - ideas and feedback sought (Microformats/Semantic web)
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49212@lists.php.net to get a copy of this message
Hey all, I'm currently working on http://pear.php.net/pepr/pepr-comments-show.php?id=533 The goal is to have a nice, clean API to discover xslt attached to webpages or xml, and transform that into RDF. IE, if you publish you contact details in hcard on a blog, and you put in one extra <link> tag, this can be turned into a much more understandable RDF fragment. It's a W3C recommendation, and it's got a pretty extensive test suite. Recommended reading: 1) http://www.w3.org/TR/grddl/ - GRDDL Spec 2) http://microformats.org/ - Microformats information 3) http://www.w3.org/2001/sw/grddl-wg/tut7/gtut.html#(28) - Brief concept overview 4) http://code.google.com/p/xmlgrddl/ - Home on google code So... Here's my current problems / design thoughts that I'd love ideas/discussion for: 1) Handling HTTP_Requests is getting complicated fast. I'm vaguely aware of HTTP_Client. Will it make life simpler or is it overkill? Scenarios I face are: * Content negotiation * Safely following HTTP Redirection (and avoiding race conditions) * HTTP Redirection: moved permanently - I need to make that kind of thing 'stick'. 2) I have a pre-rendered out RDF/XML document to compare my generated RDF/XML to. I don't have an out of the box 'compare two XML documents' tool around - there's no PHPUnit::assertEqual($xml, $other_xml); which handles all of the ins and outs that a string comparison won't cut it for. What strategies have people used in other places when trying to get good coverage of generated XML? Are there any best practices for doing this? 3) Caching - what are good implementation strategies around this? IE, Caching vs development, in one scenario you need it for scale/performance, in another you need it to get out of the way. What existing packages are there that use Caching, and would be considered 'best practice'? 4) Logging & Exception handling At the moment, I'm just throwing plain Exceptions and avoiding causing them. What's the most useful way to provide robust exceptions; but swallow the unimportant ones. IE, if you request a document with HTTP_Request, and it's 404'd; in some situations you'll want that to throw a tantrum, in others, just a polite note to the end developer ("missing isn't broken"). What existing packages do this well?

« previous php.pear.dev (#49212) next »