- From: Kay, Michael <Michael.Kay@softwareag.com>
- Date: Mon, 1 Dec 2003 14:59:45 +0100
- To: Per Bothner <per@bothner.com>, public-qt-comments@w3.org
- Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DD2F8@daemsg02.software-ag.de>
> I think there is a need for "human-readable" serialization, > which does not necessarily have to be reversible. I agree that products will want to produce such output, but does it have to be standardized? If it's only for humans to read, and not for software to read, why do we need to specify its format? And if it's for humans to read, wouldn't one want to produce something richer than a string of ASCII characters? Michael Kay Consider > exploratory entering query expressions to a processor, and > getting a serialized result back. If I type: > > 1 to 5 > > I might expect: > > 1 2 3 4 5 > > or: > > 1 > 2 > 3 > 4 > 5 > > but I would not want or expect: > > <res:atomic type="xs:integer" value="1"/> > <res:atomic type="xs:integer" value="2"/> > <res:atomic type="xs:integer" value="3"/> > <res:atomic type="xs:integer" value="4"/> > <res:atomic type="xs:integer" value="5"/> > > I might want type annotations: > > 1 : xs:integer > 2 : xs:integer > 3 : xs:integer > 4 : xs:integer > 5 : xs:integer > > or: > > (1, 2, 3, 4, 5) : xs:integer* > > but only if it is optional. > > Similarly, emitting an xs:string with quotes makes it > easier to see what is going on and to read it back in > again. However, emitting it without quotes allows the > programming to construct arbitrary formatted output. For example: > > "The sum is: ", sum($vals), ".&nl;" > > (Aside: a "new-line" predefined entity would be very useful.) > > There is also a need for an "interoperable" serialization, > which might give the result using special elements as Michael > Kay suggests. But that is a separate goal. > > The Lisp world has long distinguished "readable" output, > where (for example) string and symbols are emitted with > quotes, so the output is a valid "S-expression" that can be > read back in again, vs "display" or "non-readable" output > which is used for output meant to be read by a human, and if > you want quotes you have to write them explicitly. > -- > --Per Bothner > per@bothner.com http://per.bothner.com/ > > >
Received on Monday, 1 December 2003 09:01:51 UTC