garyp       01/06/10 11:11:17

  Modified:    java/src/org/apache/xalan/processor StylesheetHandler.java
  Log:
  Resolve bugzilla bug 2098 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2098).
  The routine checkForFragmentID was checking for an attribute of type "ID" instead of 
the "id" attribute.
  
  Revision  Changes    Path
  1.40      +13 -3     
xml-xalan/java/src/org/apache/xalan/processor/StylesheetHandler.java
  
  Index: StylesheetHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/StylesheetHandler.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- StylesheetHandler.java    2001/03/29 22:39:33     1.39
  +++ StylesheetHandler.java    2001/06/10 18:11:16     1.40
  @@ -613,8 +613,18 @@
       //m_prefixMappings.clear(); // JDK 1.2+ only -sc
       m_prefixMappings.removeAllElements(); // JDK 1.1.x compat -sc
   
  -    m_elementID++;           
  +    m_elementID++;
   
  +    // This check is currently done for all elements.  We should possibly consider
  +    // limiting this check to xsl:stylesheet elements only since that is all it 
really
  +    // applies to.  Also, it could be bypassed if m_shouldProcess is already true.
  +    // In other words, it would be under the following 'if' statement:
  +    // if (!m_shouldProcess && 
  +    //     localName.equals(Constants.ELEMNAME_STYLESHEET_STRING) &&
  +    //     url.equals(Constants.S_XSLNAMESPACEURL))
  +    // I didn't include this 'if' statement at this time because it is a small 
performance
  +    // hit and I was waiting to see if its absence caused a problem. - GLP
  +
       checkForFragmentID(attributes);
   
       if (!m_shouldProcess)
  @@ -1025,9 +1035,9 @@
   
           for (int i = 0; i < n; i++)
           {
  -          String type = attributes.getType(i);
  +          String name = attributes.getQName(i);
   
  -          if (type.equalsIgnoreCase("ID"))
  +          if (name.equals(Constants.ATTRNAME_ID))
             {
               String val = attributes.getValue(i);
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to