- From: Mark Birbeck <mark.birbeck@webbackplane.com>
- Date: Fri, 30 Apr 2010 12:00:26 +0100
- To: Ivan Herman <ivan@ivan-herman.name>
- Cc: W3C RDFa WG <public-rdfa-wg@w3.org>
Hi Ivan, >> For example, an 'error-profile-not-available' event handler might >> choose to abort processing completely, whilst a >> 'warning-prefix-not-defined' handler might be used in only in an >> editing scenario, as a way to give authors some feedback as they work. >> > > The problem with this approach is that it does not properly work in a distiller setting. If I issue > a request to distill an RDFa content, I expect a graph back. Events is then a kind of an > out-of-bands mechanism that does not fit well into the model. That is why I really prefer to > base this on graphs... I think what you want is still possible: 1. Your distiller would be a wrapper around an RDFa parser. 2. The parser would fire events at various points according to the spec -- parsing begins, parsing ends, profile loading started, profile loading completed, profile failed to load, prefix not found, and so on. (Events are something that I want to add to the RDFa DOM API anyway, and have discussed a little with Benjamin and Manu. But until I saw your suggestions, I had only been thinking of general things such as 'parsing complete'.) 3. Your distiller would have event handlers registered on the parser, and the handlers would implement whatever you decide is the appropriate course of action: you might abort processing on an error, and return an error message; you might create your 'error graph' as you describe; if a profile fails to load you may decide to load a cached version, or try a completely different server, based on a lookup. And so on. So I'm thinking that from the point of view of the specifications we should be considering providing hooks out of the parser, so that applications that use a parser can decide what they want to do with the knowledge that something has gone wrong (or right). By providing these hooks we allow for all sorts of courses of action, including the one that you describe. Regards, Mark -- Mark Birbeck, webBackplane mark.birbeck@webBackplane.com http://webBackplane.com/mark-birbeck webBackplane is a trading name of Backplane Ltd. (company number 05972288, registered office: 2nd Floor, 69/85 Tabernacle Street, London, EC2A 4RR)
Received on Friday, 30 April 2010 11:01:02 UTC