jakarta-ecs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jaison Freed" <jfr...@fbsdata.com>
Subject Possible bug in ElementAttributes.setAttributeQuoteChar()
Date Mon, 18 Aug 2003 16:24:03 GMT
Setting the attribute quote character via setAttributeQuote() char appears
to have no effect when it comes time to print the element.  After reviewing
the source of ElementAttributes, I found that the toString() method
completely disregards it's attribute_quote_char private variable.

To duplicate this behavior, use the following sample program:
=== BEGIN PROGRAM ===
import org.apache.ecs.xml.*;
import org.apache.ecs.html.*;

public class AttributeQuoteTest extends XML
{
   public AttributeQuoteTest()
   {
      super("AttributeQuoteTest");
      this.setAttributeQuoteChar('|');
   }

   public static void main(String[] args)
   {
      AttributeQuoteTest t = new AttributeQuoteTest();
      t.addElement("Test Data");
      t.addXMLAttribute("Type", "Character");

      System.out.println(t.toString());
   }
}
=== END PROGRAM ===

I have modified the source of ElementAttributes.java to fix the problem.
Would anyone be interested in the patch?  (This is my first foray into
contributing to an open source project, so please be nice.)


Jaison Freed
FBS Data Systems, Inc.
E-mail: jfreed@fbsdata.com
Phone: (701) 235-7300 x146
Fax: (701) 234-0224


---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org


Mime
View raw message