Re: [vwrap] Parsing of invalid LLSD elements in XML
Meadhbh Hamrick <ohmeadhbh@gmail.com> Wed, 31 March 2010 22:54 UTC
Return-Path: <ohmeadhbh@gmail.com>
X-Original-To: vwrap@core3.amsl.com
Delivered-To: vwrap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix)
with ESMTP id 218083A6862; Wed, 31 Mar 2010 15:54:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.044
X-Spam-Level: *
X-Spam-Status: No, score=1.044 tagged_above=-999 required=5 tests=[AWL=-0.087,
BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com
[127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xVsmbg-XE8Bg;
Wed, 31 Mar 2010 15:54:41 -0700 (PDT)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24])
by core3.amsl.com (Postfix) with ESMTP id 7CF043A6822;
Wed, 31 Mar 2010 15:54:40 -0700 (PDT)
Received: by qw-out-2122.google.com with SMTP id 9so201784qwb.31 for <multiple
recipients>; Wed, 31 Mar 2010 15:55:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:in-reply-to:references
:from:date:received:message-id:subject:to:cc:content-type
:content-transfer-encoding; bh=9yy4mIecMHEVaigxeTEThTfDeGIC2QZR1EzFJDnUPHQ=;
b=bZTql6LCL2FBNh4QOAoC1UQ2d3sZXWybr8uwbg/BRnU48ZXtrskmQ/Fw4Mhy+/mFfu
zlqMuza6HRclVM84LWffAHbQqlI6x3CEk+6zhMkQUaDc11AoeYOm/kw4JXGBhR+nv55J
1lwKTMTgxW6qVnWO975ft4wMyPv69Uar0T9Tc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:cc:content-type:content-transfer-encoding;
b=f76M3sugF82AvsUeAChI3GTR8ddzHtznP7dbh6yPZx3Hja9/ZtBjABl9wwH4dS4jxJ
DLSUpBuvcmYmWG+Xw8FrDAcgHmazBLdRl5JffLbWod0LpFrT+gXY7GwwYXbbvYi/vslC
gY057WAOBFJ7dqwBqfQKd/J/nguAARr2xbFig=
MIME-Version: 1.0
Received: by 10.229.49.78 with HTTP; Wed, 31 Mar 2010 15:54:49 -0700 (PDT)
In-Reply-To: <OF85384387.09AA3E02-ON852576F7.00797FBF-852576F7.007A36F4@us.ibm.com>
References: <q2uf72742de1003311453y212ff98ay13d6f70d77565536@mail.gmail.com>
<OF85384387.09AA3E02-ON852576F7.00797FBF-852576F7.007A36F4@us.ibm.com>
From: Meadhbh Hamrick <ohmeadhbh@gmail.com>
Date: Wed, 31 Mar 2010 15:54:49 -0700
Received: by 10.229.97.207 with SMTP id m15mr243775qcn.6.1270076109106;
Wed, 31 Mar 2010 15:55:09 -0700 (PDT)
Message-ID: <m2zb325928b1003311554za464dff6u1b0711bf217c813d@mail.gmail.com>
To: David W Levine <dwl@us.ibm.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: vwrap@ietf.org, vwrap-bounces@ietf.org
Subject: Re: [vwrap] Parsing of invalid LLSD elements in XML
X-BeenThere: vwrap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group
<vwrap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vwrap>
List-Post: <mailto:vwrap@ietf.org>
List-Help: <mailto:vwrap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Mar 2010 22:54:42 -0000
heck. discord already? that's got to be a record, david. normally we have to wait at least a couple hours to work up a really good technical disagreement. ;-) before i go off about how good it is to reduce the impact of version skew, let me say i totally get your answer. it reminds me a bit of the gulf between lovers of dynamic and statically typed languages. one of the criticisms i hear over and over again about javascript and python is that it's very easy for programmers to mistakenly mistype a member name and for it to be vaguely difficult to find the error. static typing fans frequently say dynamic languages allow errors in code to propagate and make it hard to pin down the cause of the error. dynamic language fans reply with long and drawn out descriptions for why the fragile base class problem is evil. and so it goes back and forth until functional language fans go off and make type inferring languages with the intent of making the C++ and python fans heads' explode. this is the point in a typical rant where the author predicts dire consequences if the group chooses incorrectly. so include your favorite prediction of dire consequences here. seriously though. i think this is the type of thing we need to think about a little bit more. david, you want to find some time to work through some examples next week? -- meadhbh hamrick * it's pronounced "maeve" @OhMeadhbh * http://meadhbh.org/ * OhMeadhbh@gmail.com On Wed, Mar 31, 2010 at 3:14 PM, David W Levine <dwl@us.ibm.com> wrote: > > vwrap-bounces@ietf.org wrote on 03/31/2010 05:53:25 PM: > >> [image removed] >> >> [vwrap] Parsing of invalid LLSD elements in XML >> >> Joshua Bell >> >> to: >> >> vwrap >> >> 03/31/2010 05:53 PM >> >> Sent by: >> >> vwrap-bounces@ietf.org >> >> Mark Lentczner and I were discussing this issue earlier today >> offline, and I wanted to recap it to the list. >> >> draft-hamrick-vwrap-type-system-00 does not define what should >> happen when trying to parse this LLSD XML fragment (pretend it has >> the right prologue and hence is well-formed XML): >> >> <llsd> >> <map> >> <key>test</key> >> <uuid>this is not a uuid</uuid> >> </map> >> </llsd> >> >> There are at least three reasonable outcomes: >> (1) Reject the payload entirely - the entire message should be rejected >> (2) Produces a map; value associated with key "test" is a UUID of >> 00000000-0000-0000-0000-000000000000 - which would be the result of >> converting the string "this is not a uuid" to a UUID >> (3) Produces a map; value associated with key "test" is the Undefined >> value >> >> (The map is, strictly speaking unnecessary, to the example, but it >> clarifies the context in which #3 occurs) >> >> This is not confined to UUIDs; similar issues occur with Date and >> Binary types in the XML serialization. The JSON serialization >> appears "immune" to this spec ambiguity because primitive types >> always end up as Boolean/String/Real/Undefined (in LLSD parlance); >> conversion to Integer/UUID/Date/URI/Binary can only occur at the >> application level. The Binary serialization appears "immune" to the >> spec ambiguity as well (possibly edge cases if a NaN or Infinity was >> used for a Date?) >> >> Thoughts? >> > > > My fairly strong preference is for choice (3). Choice (2) allows an error to > propagate > in ways which strikes me as highly undesirable. Choice (1) stops the error > from propagating > but likely at the expense of generating the error detection some distance > from a good place > to actually handle the error. The element is invalid, the elements framing > it (in this example, > the map) is valid, and allows the error to be stated quite explicitly. > > > - David > ~ Zha > > > _______________________________________________ > vwrap mailing list > vwrap@ietf.org > https://www.ietf.org/mailman/listinfo/vwrap > >
- [vwrap] Parsing of invalid LLSD elements in XML Joshua Bell
- Re: [vwrap] Parsing of invalid LLSD elements in X… David W Levine
- Re: [vwrap] Parsing of invalid LLSD elements in X… Meadhbh Hamrick
- Re: [vwrap] Parsing of invalid LLSD elements in X… Meadhbh Hamrick
- Re: [vwrap] Parsing of invalid LLSD elements in X… Meadhbh Hamrick
- Re: [vwrap] Parsing of invalid LLSD elements in X… John Hurliman
- Re: [vwrap] Parsing of invalid LLSD elements in X… David W Levine
- Re: [vwrap] Parsing of invalid LLSD elements in X… Mark Lentczner
- Re: [vwrap] Parsing of invalid LLSD elements in X… Carlo Wood