Hi Frank, many thanks for your elaborations. I think though that your suggestions would add more redundancy, while i'd rather want to keep it as low as possible. My primary concern is whether values should rather be given as
<value> <key>0</key> <data>1 2 3 hu ha</data> </value>
rather than currently <value key="0">1 2 3 hu ha</value> Does that matter for automatic processing of XML data or database storage? I have practically no knowledge of XML conversion.
Things that i fixed for pool include
best greetings, Thomas
----- Original Message ----- From: "Frank Barknecht" fbar@footils.org To: pd-list@iem.at Sent: Saturday, November 29, 2003 5:32 PM Subject: Re: [PD] re: state saving
Hallo, Thomas Grill hat gesagt: // Thomas Grill wrote:
could one XML expert give me a hand and have a look at the following XML structure? I have the feeling that the value item using "key" as an attribute isn't really well-done, as well as the the way how hierarchies are implemented using the "dir" item. Is there a common way to define hierarchies in XML land?
I thought about this a bit from the view of not exactly an XML expert, but maybe an HTML expert. In HTML I would see an analogy to lists. Lists in html consist of list declarations and list item declarations. List items may contain lists themselves to build up hierarchies:
<ul> <li>First list item</li> <li>Second list item <ul> <li>First nested item</li> <li>Second nested item</li> <li>Third nested item</li> </ul> </li> <li>Third list item</li> <li>Fourth list item</li> </ul>
(I also considered definition lists, but they are not good here IMO.)
Using this approach directly in the pool.xml it would look like this:
<pool> <dir key="outer_list"> <value key="a_symbol">0</value> <value key="b_symbol">89</value>
<!-- change here! Not valid with current DTD because of missing
key! -->
<value> <dir key="subfolder"> <value key="subkey">with a list inside</value> </dir> <!-- change 2 --> </value> </dir>
</pool>
I think if following the <li> example it would be much better to introduce a new attribute-less <de> ("dir entry") or <entry> tag, that is the only tag possible in a <dir> and in turn may contain <dir> and <value> items:
<pool> <dir key="outer_list"> <de><value key="a_symbol">0</value></de> <de><value key="b_symbol">89</value></de>
<de> <dir key="subfolder"> <de><value key="subkey">with a list inside</value></de> </dir> </de> </dir>
</pool>
Specifying the key name as an attribute is fine with me. For clarification maybe different names for dir-keys and value-keys might be more readable.
Just my 2 ct.
ciao
Frank Barknecht _ ______footils.org__
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list