Yes, you are right. I just checked the DTD, the value should be
selected instead of true. There are also a lot of similar attribute.
The original XHTML DOM was generated from DTD. Let me see if I can dig
out the generator and correct this error.
David
On Wednesday, Mar 19, 2003, at 21:48 Asia/Shanghai, Petr Stehlik wrote:
Hi,
Enhydra 5.0 source. File
modules/xHTML/src/org/enhydra/xml/xhtml/dom/xerces/
XHTMLOptionElementImpl.java
public void setSelected (boolean newValue) {
setAttribute("selected", newValue);
}
This is IMHO incorrect. The XHTML uses 'selected="selected"' so the
code
should be as follows:
if (newValue)
setAttribute("selected", "selected");
else
removeAttribute("selected");
Can somebody comment this? Please note that there are many such
attributes, not just 'selected', but I found it on this one (since
pre-selection of OPTION in SELECT stopped working in my app after
converting from HTML to XHTML).
Petr
_______________________________________________
Enhydra mailing list
Enhydra@xxxxxxxxxxx
http://www.enhydra.org/mailman/listinfo.cgi/enhydra
|
|