[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More feedback



Juergen Schoenwaelder a écrit :
On Tue, Nov 07, 2006 at 10:43:51AM +0100, Vincent Cridlig wrote:

A good practice could be to use attributes for both keys and required parameters.

The SMIv2 to XSD mapping of libsmi treats INDEX elements as attributes
and everything else as elements. I am not saying this is generally the
right approach, just that it was done this way for mapping SMIv2 to
XSD.

This is what I would have done also.

Phil keeps reminding us that attributes are "fun" with namespaces. Did
this cause problems to you?

The surprising thing about attributes is that they do not belong to any namespace except if you use an explicit namespace prefix, even if their parents have a namespace.
See http://www.rpbourret.com/xml/NamespacesFAQ.htm#q3_5

So I sometimes had some surprises with that, but once you know the solution, it is quickly solved.

Vincent

/js


begin:vcard
fn:Vincent Cridlig
n:Cridlig;Vincent
org:LORIA - INRIA Lorraine, France;Madynes
adr:;;;Nancy;;;France
email;internet:cridligv@loria.fr
title:PhD Student
tel;work:+33 (0)3 83 59 20 48
url:http://www.loria.fr/~cridligv
version:2.1
end:vcard