ExampleContentHandler code looks cut-and-paste typo'ed
------------------------------------------------------

         Key: XALANJ-2054
         URL: http://issues.apache.org/jira/browse/XALANJ-2054
     Project: XalanJ2
        Type: Bug
  Components: Samples-Examples  
    Versions: 2.6    
 Environment: All
    Reporter: Daniel Martin
    Priority: Minor


In ExampleContentHandler, in the function startElement, there is this line:

    System.out.print("startElement: "+namespaceURI+", "+namespaceURI+
                       ", "+qName);

Similarly, the function endElement is:

  public void endElement (String namespaceURI, String localName,
                          String qName)
    throws SAXException
  {
    System.out.println("endElement: "+namespaceURI+", "+namespaceURI+
                       ", "+qName);
  }

These should both say "localName" instead of the second occurrence of 
"namespaceURI"; printing the namespaceURI twice makes no sense, nor does not 
printing the localName.

The current code violates the principle of least surprise, and is an annoying 
fly in the ointment of TrAX understanding.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to