Re: [VCARDDAV] How to encode X-Properties in XML?

Joe Hildebrand <joe.hildebrand@webex.com> Tue, 30 March 2010 05:14 UTC

Return-Path: <Joe.Hildebrand@webex.com>
X-Original-To: vcarddav@core3.amsl.com
Delivered-To: vcarddav@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 4E07C3A6864 for <vcarddav@core3.amsl.com>; Mon, 29 Mar 2010 22:14:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.962
X-Spam-Level:
X-Spam-Status: No, score=-102.962 tagged_above=-999 required=5 tests=[AWL=-0.093, BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 BfxCz0NM1MWN for <vcarddav@core3.amsl.com>; Mon, 29 Mar 2010 22:14:49 -0700 (PDT)
Received: from gw1.webex.com (gw1.webex.com [64.68.122.208]) by core3.amsl.com (Postfix) with SMTP id C45C53A699D for <vcarddav@ietf.org>; Mon, 29 Mar 2010 22:13:49 -0700 (PDT)
Received: from SRV-EXSC03.webex.local ([192.168.252.197]) by gw1.webex.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 29 Mar 2010 22:14:14 -0700
Received: from 10.21.127.103 ([10.21.127.103]) by SRV-EXSC03.webex.local ([192.168.252.200]) with Microsoft Exchange Server HTTP-DAV ; Tue, 30 Mar 2010 05:13:48 +0000
User-Agent: Microsoft-Entourage/12.24.0.100205
Date: Mon, 29 Mar 2010 22:13:47 -0700
From: Joe Hildebrand <joe.hildebrand@webex.com>
To: Simon Perreault <simon.perreault@viagenie.ca>, vcarddav@ietf.org
Message-ID: <C7D6D69B.20BB0%joe.hildebrand@webex.com>
Thread-Topic: [VCARDDAV] How to encode X-Properties in XML?
Thread-Index: AcrPx8aMcpKv/iZE3UOD8J26TK9+fw==
In-Reply-To: <4BAA4DA6.70907@viagenie.ca>
IM-ID: xmpp:jhildebr@cisco.com
Presence-ID: xmpp:jhildebr@cisco.com
Jabber-ID: jhildebr@cisco.com
Mime-version: 1.0
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
X-OriginalArrivalTime: 30 Mar 2010 05:14:14.0081 (UTC) FILETIME=[D6B07310:01CACFC7]
Subject: Re: [VCARDDAV] How to encode X-Properties in XML?
X-BeenThere: vcarddav@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: IETF vcarddav wg mailing list <vcarddav.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/vcarddav>, <mailto:vcarddav-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vcarddav>
List-Post: <mailto:vcarddav@ietf.org>
List-Help: <mailto:vcarddav-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vcarddav>, <mailto:vcarddav-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Mar 2010 05:14:51 -0000

On 3/24/10 10:36 AM, "Simon Perreault" <simon.perreault@viagenie.ca> wrote:

> Here's a summary of the hallway discussion on this issue:
> 
> The only argument against proposal #2 (<x-foo> and <vnd-123-foo> in the
> vCard namespace) was that it prevents you from having a schema that
> would not accept invalid properties.
> 
> However, implementations already need to accept new properties that are
> registered by IANA. These will create new elements in the vCard
> namespace, just like x-props and vendor props. Therefore, the argument
> doesn't apply.
> 
> So unless new information is received, I'll go with #2 in the next rev.

I'm onboard with this approach.  There were a couple more subtleties that
came out of thinking about this some more, that I would like to see captured
in the text.  Most of this has been talked about on the list before, so this
is more in the way of recap:

- In the XML format, any child of <vcard> in the default namespace gets
translated to a text property.  X-, VND-, and
newly-registered-but-not-yet-supported-in-your-software elements all fall
into this category.  Unfortunately, it appears that we need to upcase in the
XML-to-text direction, and downcase in the opposite direction.  Now that
we're in UTF-8, there's a little bit of work to specify these mappings.

- In the XML format, any child of <vcard> in a namespace other than the
default gets turned into XML: in the text format.  Even if it is
standardized.

- In the text format, XML: properties always get directly transliterated
into XML as children of <vcard>.  This means they MUST have a namespace
other than the default.  If they don't, we can specify what happens, but the
list of things I've thought of are: 1) error, and fail translation 2) warn,
and don't copy the XML: property 3) warn, and change the namespace to some
specified warning namespace 4) do 3 silently 5) copy the element as-is.

I don't like 5, because the element won't round-trip back to text format the
same way.  3 or 4 sound fine to me, but I could live with 2 or even 1.

- Text format properties that are not currently in the XML definition (such
as X-, VND-, and new-but-iana-registered) are unlikely to ever have any
interesting structure in XML.  The best we can do is specify syntactic
transformations that survive round trips.  As a consequence, we might
consider suggesting that ALL new properties SHOULD be defined in XML format
going forward, with XML: being their native representation in the text
format.

- Do we specify what happens to \n in text format, when translated?  Does it
stay \n, or get translated to CRLF?  What about wrapped lines?  Do they get
unwrapped?  My preference would be unwrap and translate to \n to CRLF.

-- 
Joe Hildebrand