cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: [CForms] - No @id generation for <wd:output>
Date Thu, 19 Feb 2004 09:34:14 GMT
Bruno Dumon wrote:

> On Wed, 2004-02-18 at 14:10, Daniel Fagerstrom wrote:
>>Somewhat OT, I think that the current use of the id attribute in the 
>>Woody widget definition (WD) file is unfortunate. Id attributes are 
>>supposed to be unique in an XML document according to the standard,
> I don't think so. An attribute called "id" has no special meaning in
> XML.

See :

Validity constraint: ID

Values of type ID MUST match the Name production. A name MUST NOT appear 
more than once in an XML document as a value of this type; i.e., ID 
values MUST uniquely identify the elements which bear them.

>> and 
>>as id in WD files rather describe a relative position in a widget 
>>hierarchy, there are no reason for them to be unique. IMO it would be 
>>better to use the attribute name "ref" for refering to relative 
>>positions as in XForms. See also 
>>What about replaceing "id" with "ref" in the WD files when we rename 
>>Woody to CForms?
> I'm not really convinced. The "id" attribute defines the id for the
> widget, and does not reference it, as "ref" seems to suggest.
> <snip/>

Yes, there might be better names for the concept then "ref". What I mean 
is that the id attribute in the WD file not uniquely identifies a 
widget, let say that we have a widget definition:

<wd:repeater id="foo" initial-size="3">
     <wd:field id="foo">

Then it is paths like foo,, etc that uniquely 
identifies the widget.


View raw message