> I think XDoclet is cool, but the issue here is not extra tags -- it's
> extra attributes.  One of our primary design principles is that Struts
> tags would only contain attributes that correspond to valid attribute
> names (for that particular element) in HTML/4.01 -- whether the browser
> ignores extra ones or not is irrelevant, since our goal is to not emit
> invalid HTML.

Not to be picky, but this is the HTML author inserting extra tags, not
struts.

> Can you provide a specific example of what you mean by "constructed in a
> fashion which matched the HTML spec" and how you would suggest improving
> them?  Keep in mind (per my preceding response) that we don't have the
> ability to modify the syntax of a TLD file, since that is defined by the
> JSP Specification.  All we can possibly do is refactor the underlying base
> classes.

The structure of the HTML spec is an object oriented document and if the
elements and attributes were emitted in a similar fashion i.e. 


<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
<!ATTLIST SELECT
  %attrs;                              -- %coreattrs, %i18n, %events --
  name        CDATA          #IMPLIED  -- field name --
  size        NUMBER         #IMPLIED  -- rows visible --
  multiple    (multiple)     #IMPLIED  -- default is single selection --
  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
  onfocus     %Script;       #IMPLIED  -- the element got the focus --
  onblur      %Script;       #IMPLIED  -- the element lost the focus --
  onchange    %Script;       #IMPLIED  -- the element value was changed --

one might have designed the following objects

        emitCoreattrs / emitI18n / emitEvents as java objects
        emitName as a object.

In some ways struts takes shortcuts i.e. in the events it just always
outputs all the events.  In other ways it has too many objects, i.e.
TextTag, HiddenTag instead of InputTag with type=text/hidden.  Also, IMHO
nesting should be an attribute of each base tag rather than a trivial object
extending each of the base tags.  The result is you end up with large
unwieldy and buggy tld's.

Of course if this is obsolete, then my apologies for wasting everyone's time
:-(.

Edgar

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to