I cannot get into cvs through our firewall, and do not know how to submit a 
patch.  I did find a couple of bugs, though, and wanted to let you know about 
them.  I tried sending them to the owners at [EMAIL PROTECTED] and 
[EMAIL PROTECTED], but both messages were returned as undeliverable.

First, in org.apache.ecs.ElementAttributes.java:

addAttribute has a flavor that accepts an int, Integer or Object as an 
attribute value.  If you use anything but a String, though, you get a 
ClassCastException in createStartTag.  On line 352, in the "else" branch 
where getAttributeFilterState() is false, the code is:

value = (String) getElementHashEntry().get(attr);

it should be:

value = getElementHashEntry().get(attr).toString();

Second, in org.apache.ecs.html.Script:

I defined a Script element as follows:

new Script().setSrc("js/Generic.js").setType("text/javascript")
.setLanguage("JavaScript")

When this was output, I got:

<script type="text/javascript" src="js/Generic.js" language="JavaScript">
    <!--

    // -->
</script>

Since the script has a "body" defined inline, the src attribute is ignored.

The problem is, createStartTag() and createEndTag() generate the comments 
whether or not there is a body to surround.  The fix is to surround the three 
"out.append(..." lines in each method with:

if (!(hasAttribute("src"))) {
    .
    .
    .
}

I hope these will be seen by the right people.
-- 
Jim McMaster
mailto:[EMAIL PROTECTED]





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

Reply via email to