Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-139

XMLParser should create a new XML-writing TagScript rather than an ExpressionScript

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.0-beta-5
    • Fix Version/s: None
    • Component/s: core / taglib.core
    • Labels:
      None

      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);
      textBuffer.append("=");
      textBuffer.append("\"");
      textBuffer.append(list.getValue);
      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hgilde Hans Gilde
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: