minchau     2003/07/08 16:24:44

  Modified:    java/src/org/apache/xml/serializer ToHTMLStream.java
  Log:
  Fix for bugzilla 21423
  PR: 21423
  
  Bug caused by an optimization where the element name was not
  remembered if the HTML tag was empty and the endElement() call
  was coming right away.  But XSLTC injected startNamespaceAfterElement() 
  in the middle, and it needed the element name, So startElement() records the 
  element name in the ElemContext even though the context is soon going away.
  
  
  Submitted by: Brian Minchau
  
  Revision  Changes    Path
  1.20      +5 -1      
xml-xalan/java/src/org/apache/xml/serializer/ToHTMLStream.java
  
  Index: ToHTMLStream.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ToHTMLStream.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ToHTMLStream.java 7 Jul 2003 06:23:51 -0000       1.19
  +++ ToHTMLStream.java 8 Jul 2003 23:24:43 -0000       1.20
  @@ -779,8 +779,12 @@
               if (elemDesc.is(ElemDesc.EMPTY) )  
               {
                   // an optimization for elements which are expected
  -                // to be empty.  Only remember the element description.
  +                // to be empty.
                   m_elemContext = m_elemContext.push();
  +                /* XSLTC sometimes calls namespaceAfterStartElement()
  +                 * so we need to remember the name
  +                 */
  +                m_elemContext.m_elementName = name;
                   m_elemContext.m_elementDesc = elemDesc;
                   return;                
               } 
  
  
  

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

Reply via email to