Property list elements?

Might an extra type of list be useful? One that exists of properties and 
values. It would have to be some kind of mix between a table and a 
definition list. These are the requirements that I think are appropiate:
 
The "property list element" itself will behave like a dl or table 
element. The "property name element" mentions a certain property, which 
may be any kind of inline level content. The "property value element" 
represents the value of the property, which may be any kind of inline of 
block level content. I'm not sure if some sort of element is required to 
group one "property name element" and one "property value element". A 
property list might be structured as follows:
 
<pl>
   <pn>color</pn><pv>#000000</pv>
   <pn>background-color</pn><pv>#FFFFFF</pv>
   <pn>font-family</pn><pv>arial, helvetica, sans-serif</pv>
</pl>
 
Another possibility:
 
<pl>
   <prop><pn>color</pn><pv>#000000</pv></prop>
   <prop><pn>background-color</pn><pv>#FFFFFF</pv></prop>
   <prop><pn>font-family</pn><pv>arial, helvetica, sans-serif</pv></prop>
</pl>
 
I introduced some new elements/tag names, but maybe the name "property 
list" is not exactly the right name, so the names of the pl, pn, pv and 
prop elements may be subject to change.
 
These lists could be used to display lists of properties. Each property 
MUST have a value, and it MUST be only one value. It is something else 
than a definition list, in my opinion. I think such property 
list elements may also be used in forms. Actually, this is the reason I 
came to think about these new elements, since dl and table elements are 
not really suitable elements, I think. The property name may contain a 
label, the property value may contain one or more input elements (not 
defined in XHTML 2.0 of course).
 
So the list may contain properties and values, and it is particularly 
useful for providing a way to structure commonly used forms. It is not 
meant for listing menu items. (It might also prove useful for creating 
common forum layouts. In this case it might be a good idea to allow 
block level content in the pn element. It could contain information 
about a forum user, while the pv element contains his message/post.)
 
I think the list should be rendered like some sort of table by default. 
The pn behaving much like a th and/or dt element, the pv behaving like a 
td and/or dd element. So I suggest the property name and value 
elements are some kind of table cells, with their content aligned in the 
left top corner (default style sheet). Maybe some space 
(padding) between the properties and their values.
 
 

Received on Wednesday, 14 April 2004 02:48:50 UTC