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

Joe Hildebrand <joe.hildebrand@webex.com> Tue, 30 March 2010 14:51 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 A59D13A6BEC for <vcarddav@core3.amsl.com>; Tue, 30 Mar 2010 07:51:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.231
X-Spam-Level:
X-Spam-Status: No, score=-104.231 tagged_above=-999 required=5 tests=[AWL=1.238, BAYES_00=-2.599, 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 yGzsMyh5P6vn for <vcarddav@core3.amsl.com>; Tue, 30 Mar 2010 07:51:03 -0700 (PDT)
Received: from gw1.webex.com (gw1.webex.com [64.68.122.208]) by core3.amsl.com (Postfix) with SMTP id 500E83A6BF0 for <vcarddav@ietf.org>; Tue, 30 Mar 2010 07:48:40 -0700 (PDT)
Received: from SRV-EXSC03.webex.local ([192.168.252.197]) by gw1.webex.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 30 Mar 2010 07:49:09 -0700
Received: from 10.21.91.99 ([10.21.91.99]) by SRV-EXSC03.webex.local ([192.168.252.200]) with Microsoft Exchange Server HTTP-DAV ; Tue, 30 Mar 2010 14:48:58 +0000
User-Agent: Microsoft-Entourage/12.24.0.100205
Date: Tue, 30 Mar 2010 07:48:56 -0700
From: Joe Hildebrand <joe.hildebrand@webex.com>
To: Simon Perreault <simon.perreault@viagenie.ca>
Message-ID: <C7D75D68.20C07%joe.hildebrand@webex.com>
Thread-Topic: [VCARDDAV] How to encode X-Properties in XML?
Thread-Index: AcrQELbKDM1jF562TMicNnYEzCH88AAB2i47
In-Reply-To: <4BB202E5.60004@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 14:49:09.0437 (UTC) FILETIME=[27860ED0:01CAD018]
Cc: vcarddav@ietf.org
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 14:51:04 -0000

On 3/30/10 6:55 AM, "Simon Perreault" <simon.perreault@viagenie.ca> wrote:

> In text vCard, properties are case-insensitive. So no need to upcase in
> this direction.
> 
> But as was already mentioned, property names are limited to
> [a-zA-Z0-9-].

Ah, ok.  Didn't realize those, sorry.

>> - 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.
> 
> I'd rather follow Postel's principle.
> 
> - On output, the element in XML: MUST have a namespace, and it MUST NOT
> be the vCard 4 namespace.

Yes.

> - On input, the content of the XML: property MUST be interpreted as a
> single XML element.

Some text like this would probably be worth mentioning to those that hadn't
thought of the round-tripping problem:

"Note that if the element is in the vCard 4 namespace (either by having no
namespace declaration, or by having the vCard 4 namespace explicitly
redefined), and the element is inserted into an XML format document, it will
not be possible to regenerate the exact form of the text document from the
XML document."

>> - 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.
> 
> +0.5
> 
> The problem is that these new properties would be in the vCard 4
> namespace, and we said that no element in this namespace can appear as
> the content of the XML property.

No.  I'm suggesting that we put these extensions in a new namespace,
preferably a new namespace per spec that adds 1+ properties.

>> - 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.
> 
> We have this currently:
> 
>                                                                The chunk
>        is subject to normal line folding and escaping, i.e. replace all
>        backslashes with "\\", then replace all newlines with "\n", then
>        fold long lines.
> 
> Can you suggest text to be added?

Ah, that's in the base spec, and I was looking for it in the XML spec.  The
XML spec has:

   Line folding is a non-issue in XML.  Therefore, the mapping from
   vCard to XML is done after the unfolding procedure is carried out.
   Conversely, the mapping from XML to vCard is done before the folding
   procedure is carried out.

Which is a little unclear with respect to \\, although it can be intuited.

I guess I'm hoping we're going to end up with sections in the XML spec that
talk about how to convert to and from the XML format (with examples).  That
would be an appropriate place to move the text above.  The example should
have one of each of the known edge cases.

-- 
Joe Hildebrand