- From: Dan Connolly <connolly@w3.org>
- Date: Thu, 28 Sep 2006 16:22:55 -0500
- To: Murray Maloney <murray@muzmo.com>
- Cc: GRDDL Working Group <public-grddl-wg@w3.org>
On Tue, 2006-09-26 at 17:12 -0400, Murray Maloney wrote: > http://www.w3.org/2004/01/rdxh/spec [...] > > Again, I am confused. Why is it an error to use document() in your > transform? > Might I not want to include some boiler-plate RDF in response to a > well-known > chunk of XML? I think Chime asked about that too; perhaps this reply will answer him too... How to explain... perhaps a little dialog (trialog?): Bob: I have an algorithm, A1, that takes as input a number between 1 and 100. Pick a number. Joe: 73 Bob: A1(73) = 76. Now you try, Fred. Pick a number. Fred: I like 73 too. Bob: A1(73) = 77 Fred and Joe: huh?! you just told us it was 76! Bob: The A1 algorithm is: take the given number and add the number of letters in the name of the person that gave the number. "Joe" has 3 letters; "Fred" has 4. Joe: But you said the algorithm takes as input a number between 1 and 100; on that input, it's clearly not well-defined. It's only a well-defined algorithm if it also takes a name as input. Bob: OK, you're right, my algorithm has another input. An XSLT transformation that uses document() has another input besides the source document. So the result depends not just on the transformation and the source document, but also on the resource referenced in the document() function; i.e. it depends on what's going on in other parts of the Web. The GRDDL spec is saying: if you do that, all bets are off! i.e. "it is an error" in the sense of "if you do that, you have stepped outside the scope of this specification, and we don't make any promises about interoperability." Maybe that's too strong, but it seemed like the conservative approach at the time it first occurred to me. -- Dan Connolly, W3C http://www.w3.org/People/Connolly/ D3C2 887B 0F92 6005 C541 0875 0F91 96DE 6E52 C29E
Received on Thursday, 28 September 2006 21:23:17 UTC