You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/03/23 23:13:55 UTC

[Bug 1102] New - NullPointerException in StylesheetHandler.java in method pushSpaceHandling

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

*** shadow/1102	Fri Mar 23 14:13:55 2001
--- shadow/1102.tmp.3023	Fri Mar 23 14:13:55 2001
***************
*** 0 ****
--- 1,41 ----
+ +============================================================================+
+ | NullPointerException in StylesheetHandler.java in method pushSpaceHandling |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1102                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.1                   |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Normal                   OS/Version: All                     |
+ |     Priority:                           Component: org.apache.xalan.proces |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xalan-dev@xml.apache.org                                     |
+ |  Reported By: rainer@gtt.me-park.com                                       |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ The stylesheet processor crashes in 
+ org.apache.xalan.processor.StylesheetHandler in method pushSpaceHandling with 
+ a NullPointerException in line 1575 if a stylesheet is to be compiled into a 
+ Templates instance from a preparsed DOMSource instance.
+ 
+ the following diff fixes the problem:
+ *** StylesheetHandler.java.org	Fri Mar 23 23:11:22 2001
+ --- StylesheetHandler.java	Fri Mar 23 22:47:56 2001
+ ***************
+ *** 1572,1578 ****
+       String value = attrs.getValue("xml:space");
+       if(null == value)
+       {
+ !       m_spacePreserveStack.push(m_spacePreserveStack.peek());
+       }
+       else if(value.equals("preserve"))
+       {
+ --- 1572,1578 ----
+       String value = attrs.getValue("xml:space");
+       if(null == value)
+       {
+ !       m_spacePreserveStack.push(m_spacePreserveStack.peekOrFalse());
+       }
+       else if(value.equals("preserve"))
+       {