W3C home > Mailing lists > Public > www-html@w3.org > April 2004

Property list elements?

From: Edwin van Vliet <cheatah@tweakers.net>
Date: Tue, 13 Apr 2004 22:44:52 +0200
Message-ID: <407C5144.4090409@tweakers.net>
To: "www-html@w3.org" <www-html@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:00 GMT