DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5498>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5498

The attr's namespace URI for xsl:stylesheet is not checked properly

           Summary: The attr's namespace URI for xsl:stylesheet is not
                    checked properly
           Product: XalanJ2
           Version: 2.2.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: org.apache.xalan.processor
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In the file ProcessorLRE.java, line 163, the default namespace for an attribute
is tested for as NULL.  The default namespace for an attribute will be the empty
string "".  This causes failues to validate a stylesheet whose stylesheet 
element contains two or more namespace definitions (eg xmlns:xls and xmlns:fo).

The line should be modified to be:
          String attrLocalName = attributes.getLocalName(i);
          String attrUri = attributes.getURI(i);
          String value = attributes.getValue(i);
  -----> if ((null != attrUri || "".equals(attrUri)) && attrUri.equals
(Constants.S_XSLNAMESPACEURL))
          {
            stylesheetAttrs.addAttribute(null, attrLocalName, attrLocalName,
                                         attributes.getType(i),
                                         attributes.getValue(i));
          }

You can verify that a null test in invalid by looking at AttrList.getURI which 
returns "" if the namespaceURI is null.

Reply via email to