Re: Patch to custom object: object-specific properties (preliminary)



----- Original Message -----
From: "Alan Horkan"
Sent: Sunday, November 23, 2003 11:10 PM

Although it is highly unlikely that this XML will be parsed by anything
other than Dia it is best practice to preceed the closing slash with a
space, it makes things easier for crappy parsers.  (It's trivial and I'm
nit picking, but that's just what I do)

like so:

   <ext_attributes>
    <attribute name="ID" type="string" />
    <attribute name="Resistance (ohms)" type="int" />
    <attribute name="Power dissipation (W)" type="real" />
    <attribute name="SMD package" type="bool" />
   </ext_attributes>

Maybe you will want to process thse tags with an external script or
something and the extra spaces might make things easier.

(I still have reservations about this but I'm dont want to hold you back,
just suggest that a more generalised approach might pay off in the
long run).

I really missed this detail of XML syntax (or practice?). Anyway, the above
fragment was just an example to show tags and attributes, and I think that
ultimately there will be very little handwritten XML, if any.
Also, I didn't see that extra space in Dia files and in others generated by
libxml, so, if you think it's important, you should recommend this to libxml
folks as well, since most programs rely on libxml to create XML files.

Sincerely.

Marco




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