commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From commons-...@jakarta.apache.org
Subject [jira] Created: (JELLY-139) XMLParser should create a new XML-writing TagScript rather than an ExpressionScript
Date Sun, 12 Sep 2004 22:22:37 GMT
Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JELLY-139

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JELLY-139
    Summary: XMLParser should create a new XML-writing TagScript rather than an ExpressionScript
       Type: Bug

     Status: Unassigned
   Priority: Minor

    Project: jelly
 Components: 
             core / taglib.core
   Versions:
             1.0-beta-5

   Assignee: 
   Reporter: Hans Gilde

    Created: Sun, 12 Sep 2004 3:21 PM
    Updated: Sun, 12 Sep 2004 3:21 PM

Description:
When XMLParser encounters an XML tag, it tries to find the tag in a tag library. If it can't
find the tag, it wants to output the tag as text to the XMLOutput when the script is run.

Currently, it does this by creating a String:

textBuffer.append("<");
textBuffer.append(qName);
int size = list.getLength();
for (int i = 0; i < size; i++) {
   textBuffer.append(" ");
   textBuffer.append(list.getQName(i));
   textBuffer.append("=");
   textBuffer.append("\"");
   textBuffer.append(list.getValue(i));
   textBuffer.append("\"");
}
textBuffer.append(">");

then, it creates a new ExpressionScript to output this string at runtime.

The result is that, among other things, although XMLOutput implements ContentHandler, the
SAX interfaces aren't used to output the XML. This means that, even if the tag turns out to
be empty, it will be written as "<tag></tag>" instead of "<tag/>".

Instead, XMLParser sould create a TagScript that knows how to output XML. It would pass the
script the tag name and give it tag attributes in the same way that all TagScripts get their
attributes. This new XMLOutputScript would simply output the non-dynamic XML at runtime using
the correct SAX interfaces.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message