morten      01/11/27 06:42:02

  Modified:    java/src/org/apache/xalan/xsltc/compiler AttributeSet.java
  Log:
  A fix for a regression introduced by a fix for whitespace handling.
  PR:           n/a
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.9       +15 -6     
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AttributeSet.java
  
  Index: AttributeSet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AttributeSet.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AttributeSet.java 2001/10/30 08:42:55     1.8
  +++ AttributeSet.java 2001/11/27 14:42:02     1.9
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: AttributeSet.java,v 1.8 2001/10/30 08:42:55 morten Exp $
  + * @(#)$Id: AttributeSet.java,v 1.9 2001/11/27 14:42:02 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -141,6 +141,9 @@
                parser.getSymbolTable().setCurrentNode(child);
                child.parseContents(parser);
            }
  +         else if (child instanceof Text) {
  +             // ignore
  +         }
            else {
                ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_CHILD_ERR, this);
                parser.reportError(Constants.ERROR, msg);
  @@ -185,8 +188,12 @@
   
        // Merge the contents of the two attribute sets...
        final Enumeration attributes = other.elements();
  -     while (attributes.hasMoreElements())
  -         setFirstElement((XslAttribute)attributes.nextElement());
  +     while (attributes.hasMoreElements()) {
  +         SyntaxTreeNode element = (SyntaxTreeNode)attributes.nextElement();
  +         if (element instanceof XslAttribute) {
  +             setFirstElement((XslAttribute)element);
  +         }
  +     }
       }
   
       /**
  @@ -206,9 +213,11 @@
        // Translate all local attributes
        final Enumeration attributes = elements();
        while (attributes.hasMoreElements()) {
  -         final XslAttribute attribute =
  -             (XslAttribute)attributes.nextElement();
  -         attribute.translate(classGen, methodGen);
  +         SyntaxTreeNode element = (SyntaxTreeNode)attributes.nextElement();
  +         if (element instanceof XslAttribute) {
  +             final XslAttribute attribute = (XslAttribute)element;
  +             attribute.translate(classGen, methodGen);
  +         }
        }
        final InstructionList il = methodGen.getInstructionList();
        il.append(RETURN);
  
  
  

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

Reply via email to