On Mon, 2010-04-12 at 10:28 +0200, Michal Fojtik wrote:
> On 09/04/10 16:59 -0700, [email protected] wrote:
> 
> >XML Representation
> >==================
> >
> >The XML representation for hardware profiles looks like
> >
> >  <hardware-profile 
> > href="http://localhost:3001/api/hardware_profiles/m1-large";>
> 
> Why we use both hardware-profile and hardware_profile ? This must be
> handled by extra code in client/aggregator. For me, using hardware_profile
> also in URL is fine (same for storage(-_)snapshots/volumes).

An attempt at foolish consistency ;) I thought that we use '-' to
separate words in most tag names, rather than '_'. But that's not true,
and we do use '_' e.g. in <owner_id/>

Based of the discussions with the RHEV-M guys, it might be best if we
take another look at all our XML, and replace '-' with '_' for
consistency.

I think though we should just do that with another cleanup patch.

> Nice. We should consider creating a DTD or XScheme for all XMLs we produce
> and publish it on website (+ integrate it as part of tests)

Agreed; I am a little hesitant to do that, since writing good schemas is
a lot of work, and only worth it if anybody pays attention to them (and
in any event, it should be Relax-NG, DTD aren't all that expressive, and
XML Schema is inscrutable)

> Nice. Why isn't 'id' part of element btw? According to this whitepaper
> (http://www.ibm.com/developerworks/xml/library/x-eleatt.html) 'ID' is
> perfect candidate for element attribute.

Another thing that I'd like to see cleaned up, though there's some
discussion around using a consistent style over all REST API's we
publish (e.g., for RHEV-M, too) But you are right: <id/> should really
be an attribute.

David


_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to