[
Lists Home |
Date Index |
Thread Index
]
Jonathan Borden scripsit:
> > This view of typing is common enough, but IMHO goes beyond necessity.
>
> Goes beyond necessity for what?
What is necessary for the use of datatypes in validation contexts.
> > The RNG view of a datatype is that it is simply a pair of boolean
> > functions on strings: isFoo(string) is true iff string is a syntactically
> > sound representation of the type Foo, and sameFoo(string1, string2) is
> > true iff string1 and string2 are interchangeable representations of Foo.
> > No notion of "objects of type Foo" is or need be introduced.
>
> I am not sure what you are getting at. One can use the phrase "objects of
> type Foo" as a synonym for "the class of x for which isFoo(x) is true".
One can, but it's unusual. We typically say that the objects of type Integer
are e.g. 1, 5, -256, not "1", "005", "-256". The isInteger and sameInteger
predicates are defined on strings, however, and no notion of integers as
such is required.
> I assume you are saying that XSD can do -without- types, and to the extent
> that XSD is used as a language to express -syntactic constraints- on unicode
> strings, this is certainly true.
Indeed.
> The point of semantics is that now that we
> have a piece of XML that let's say corresponds to some RNG pattern or XSD
> type _now what_. How can we specify how different programs i.e. processes
> might use this piece of XML in an interoperable fashion.
Walter's point is that outside a master-slave context, we can't in general.
> For example suppose
> I write:
>
> Penicillin 500mg p.o. q.i.d. x 3 weeks.
Depending on the recipient, this can be instantiated in various ways.
The drug dispensing device will interpret it as:
drug: penicillin
dosage: 500 mg
quantity: 84
The label printer will interpret it as:
drug: penicillin 500 mg
instructions: take one pill four times a day
quantity: 84
But the insurance company (or part thereof) may interpret it as:
generic drug: true
And the state may interpret it as:
controlled substance: false
> I want to be very precise about what happens when this message is sent to
> the pharmacy -- at least as precise as the current situation when I write
> this down on a slip of paper and transmit the message via sneakernet.
This is indeed a master-slave situation: the pharmacist is your agent.
However, Walter's techniques are applicable when the parties to a transaction
are not in the master-slave relationship, and indeed may not even know of
one another's existence.
--
John Cowan <jcowan@reutershealth.com>
http://www.reutershealth.com http://www.ccil.org/~cowan
Yakka foob mog. Grug pubbawup zink wattoom gazork. Chumble spuzz.
-- Calvin, giving Newton's First Law "in his own words"
|