Return-Path: X-Original-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98A4498E5 for ; Thu, 10 Nov 2011 14:16:18 +0000 (UTC) Received: (qmail 32033 invoked by uid 500); 10 Nov 2011 14:16:18 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 32016 invoked by uid 500); 10 Nov 2011 14:16:18 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 32008 invoked by uid 99); 10 Nov 2011 14:16:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2011 14:16:18 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dug@us.ibm.com designates 32.97.110.153 as permitted sender) Received: from [32.97.110.153] (HELO e35.co.us.ibm.com) (32.97.110.153) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2011 14:16:07 +0000 Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 10 Nov 2011 07:15:45 -0700 Received: from d03relay03.boulder.ibm.com ([9.17.195.228]) by e35.co.us.ibm.com ([192.168.1.135]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 10 Nov 2011 07:15:42 -0700 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAAEFX8n129916 for ; Thu, 10 Nov 2011 07:15:35 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAAEFSsa021098 for ; Thu, 10 Nov 2011 07:15:28 -0700 Received: from d03nm119.boulder.ibm.com (d03nm119.boulder.ibm.com [9.17.195.145]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pAAEFROW021055 for ; Thu, 10 Nov 2011 07:15:28 -0700 In-Reply-To: To: deltacloud-dev@incubator.apache.org MIME-Version: 1.0 Subject: Re: Model layer for CIMI X-Mailer: Lotus Notes Release 7.0 HF144 February 01, 2006 From: Doug Davis Message-ID: Date: Thu, 10 Nov 2011 09:02:35 -0500 X-MIMETrack: Serialize by Router on D03NM119/03/M/IBM(Release 8.5.1FP2|March 17, 2010) at 11/10/2011 07:15:27, Serialize complete at 11/10/2011 07:15:27 Content-Type: multipart/alternative; boundary="=_alternative 004D216285257944_=" x-cbid: 11111014-6148-0000-0000-000001179C63 X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 004D216285257944_= Content-Type: text/plain; charset="US-ASCII" I think its safe to assume that when the xsd for the cimi spec is written it'll be written such that the xml elements will be required to be in the order specified by the xsd. thanks -Doug ______________________________________________________ STSM | Standards Architect | IBM Software Group (919) 254-6905 | IBM 444-6905 | dug@us.ibm.com The more I'm around some people, the more I like my dog. Tong Li/Raleigh/IBM@IBMUS 11/10/2011 08:36 AM Please respond to deltacloud-dev@incubator.apache.org To deltacloud-dev@incubator.apache.org cc deltacloud-dev@incubator.apache.org Subject Re: Model layer for CIMI I do not think DMTF cimi spec strongly suggested the sequence of the elements. At least it did not say in the spec. although most of the samples do show a patten of the elements. When I used XmlSimple (), it actually keeps the right order with the xml it reads in. The difficulty is when you have a hash (produced by XmlSimple from an XML doc), you most likely will add or remove things off of the hash, that is where it sequence really get messed up, I do not consider it has anything to do with the XmlSimple, it is just when hash get serialized to xml or json, probably the serializer does not know how to deal with the sequence since the hash certainly does not have the sequence information of its members. just my 2cents. Tong Li Emerging Technologies & Standards Building 501/B205 litong01@us.ibm.com lutter---11/09/2011 04:19:20 PM---This is a model layer for CIMI that does both serialization and deserialization of JSON and XML base From: lutter@redhat.com To: deltacloud-dev@incubator.apache.org Date: 11/09/2011 04:19 PM Subject: Model layer for CIMI This is a model layer for CIMI that does both serialization and deserialization of JSON and XML based on a simple metadata description of the CIMI model expressed in a custom DSL. In particular, we won't need HAML templates to format objects, and I am reasonably sure that the metadata makes sure we serialize in a predictable manner to XML. Patch 1/2 contains the basics, including the DSL, 2/2 shows how this can be used for a specific class. There's a few convenience additions that should be made to the DSL, in particular making it possible to reuse nested structures that are used in several places, something like array :operations, :class => Operation but we can add that later. One small fly in the ointment is that the use of XmlSimple causes child elements in XML to be rendered in an unpredictable order; the CIMI standard doesn't say anything about reordering elements, though with a strict interpretation of XML, the rendered XML does not conform to the XML schema implicitly defined in the CIMI standard. David --=_alternative 004D216285257944_=--