[22 March 2008]
My evil twin Enrique [formerly known as Skippy] dropped by again the other day.
“I’ve written the world’s smallest conforming XSD 1.0 implementation, #x201D; he announced.
“And it’s open source. Wanna see it? I call it Cheney. (Think of it as a kind of hommage.)”
I began to have a bad feeling about this. “Cheney?”
“Yeah. He da man, when it comes to fast schema validation.”
“Tell me about it.”
“Well, you know how proud the XML Schema working group is that the spec doesn’t require that XSD processors accept schema documents or input that’s actually in XML?”
“Er, some of the working group, yes.”
“And you know how carefully 1.0 was drafted so as to ensure that processors can be written for very specialized environments? For example, highly security-conscious ones. So there’s no required output format, no required API — nothing is required.”
“Ah, yes, right.”
“And you will recall, of course, how strongly some in the working group have resisted any suggestion in the spec that implementations be required to document anything.”
“Because that would be telling people how to write their documentation.” He was smiling.
I refused to take that bait.
“And the working group is so proud of achieving perfect interoperability in XSD 1.0.”
As it happens, I prefer not to talk about that, especially not with Enrique when he is smiling like a cat working with a mouse. So I contented myself with asking “So tell me about Cheney. You mentioned security a moment ago. Is that the connection to the Vice President?”
“Yes, Cheney is intended for deployment in high-security situations. It’s got rock-solid security, and it’s fully conforming to XSD 1.0. Oh, and it’s highly optimized, so it’s blazingly fast.”
“How does it work?”
He handed me a piece of paper on which was written:
#!/bin/sh echo "You are not authorized for that information."
“That’s it?” I asked.
“Yes. Sweet, isn’t it? And fast. I figure I call sell this for a bundle, to people who need a support contract.”
“Uh, you think this is conforming?”
“Sure is,” he said.
“But it doesn’t seem to do anything.”
“Well, I’m not required to expose all of the PSVI, or any particular part of it. I’m not required to expose any of the PSVI. So I don’t.”
“And if it can be proven that some particular part of the PSVI (a) isn’t exposed by a given implementation, and (b) doesn’t affect the parts of the PSVI that are exposed by that implementation, then I can optimize by not actually performing the calculation that would otherwise be necessary. Since I don’t expose anything, I get some pretty good optimization.”
“So I see. But isn’t — well, but having a schema validator that doesn’t actually do anything — isn’t that kind of useless?”
“My customers show up with a checklist saying they need a conforming processor, and I give it to them. They have been trained to think that conformance or non-conformance is a useful way to describe processors. Most of them think it’s the most important way. And you can understand why. Lots of specs go to great lengths to try to ensure that conforming processors are useful. For those specs, asking first of all about conformance is a very useful way to find useful software. Is it my fault that the XSD 1.0 spec doesn’t bother to make sure that conformance is a useful idea? Eventually, customers catch on; I don’t get much repeat business. But they don’t usually catch on until after their checks have cleared.”
“Isn’t that cheating?”
“Cry me a river, liberal. If you had wanted conforming processors to be useful, and to give the same results as other conforming processors, then you would have done a better job defining conformance, wouldn’t you?”
He paused and then declaimed in the tones of a television advertisement: “Cheney. What you don’t know, we won’t tell you. Interoperate with that.”