Re: data model

Note I am distinguishing between "parser" and "processor"
I suggest there are valid and conformance roles for both.
And they are quite different.


And wc would only be a conformant "processor" if it output meaningfully correct data on 
MicroXML documents.  I which case why would that be absurd  ?
Current wc(1) probably isn't uf8 aware so wouldn't count. But what if I wrote one that was ?  Why is a program that produces the output I want being considered conformant absurd ?  As long as it acts according to the abstract data model.


What about XQuery or subset like xpath  ?  It should be a conformant processor even it Doesnt expose the data model directly but only operates on it and produces valid results.

Again, the difference between parser and processor.




Sent from my iPad (excuse the terseness) 
David A Lee
dlee@calldei.com


On Oct 1, 2012, at 12:34 PM, "John Cowan" <cowan@mercury.ccil.org> wrote:

> David Lee scripsit:
> 
>> Imagine this simple practical case.  A Micro XML processor that counts
>> the number of tags.  It need not be built upon a fully featured parser.
>> Yet it should be considered "conformant" if it produces the right
>> answer for any MicroXML document.
> 
> I don't agree that it's a conformant parser; it only conforms to its
> self-defined goal.  What about a "MicroXML processor" that counts the
> number of characters in a MicroXML document?  If that's conformant,
> you'd have to say wc(1) is conformant to MicroXML, which is absurd.
> 
>> (please don't fall into the DOM trap of defining an actual interface !)
> 
> I think defining an interface is a Good Thing.  Sockets haven't suffered
> from having a defined interface.  It's just a separate job from defining
> an abstract data model.
> 
> -- 
> John Cowan <cowan@ccil.org>             http://www.ccil.org/~cowan
> Sir, I quite agree with you, but what are we two against so many?
>    --George Bernard Shaw,
>         to a man booing at the opening of _Arms and the Man_

Received on Monday, 1 October 2012 16:53:33 UTC