Details
-
Bug
-
Status: Resolved
-
Resolution: Cannot Reproduce
-
2.3Dx
-
None
-
None
-
Operating System: Linux
Platform: PC
-
8623
Description
Index: src/org/apache/xalan/processor/StylesheetHandler.java
===================================================================
RCS file:
/home/cvspublic/xml-xalan/java/src/org/apache/xalan/processor/StylesheetHandler.java,v
retrieving revision 1.47
diff -u -b -r1.47 StylesheetHandler.java
— src/org/apache/xalan/processor/StylesheetHandler.java 10 Oct 2001
18:42:07 -0000 1.47
+++ src/org/apache/xalan/processor/StylesheetHandler.java 29 Apr 2002
14:48:16 -0000
@@ -103,6 +103,7 @@
import javax.xml.transform.TransformerException;
import org.apache.xml.utils.SAXSourceLocator;
+import org.xml.sax.helpers.LocatorImpl;
/**
- <meta name="usage" content="advanced"/>
@@ -441,7 +442,7 @@
public void setDocumentLocator(Locator locator) { - // System.out.println("pushing locator for: "+locator.getSystemId()); + //System.out.println("pushing locator for: "+locator.getSystemId()); m_stylesheetLocatorStack.push(new SAXSourceLocator(locator)); }
@@ -927,6 +928,15 @@
{
SAXSourceLocator locator = getLocator();
+
+ // clone it as locator is shared and its value may dismiss
+ LocatorImpl clone = new LocatorImpl();
+ clone.setSystemId(locator.getSystemId());
+ clone.setPublicId(locator.getPublicId());
+ clone.setColumnNumber(locator.getColumnNumber());
+ clone.setLineNumber(locator.getLineNumber());
+ locator = new SAXSourceLocator(clone);
+
ErrorListener handler = m_stylesheetProcessor.getErrorListener();
TransformerException pe;
@@ -1482,6 +1492,7 @@
if (m_stylesheetLocatorStack.isEmpty())
{
+
SAXSourceLocator locator = new SAXSourceLocator();
locator.setSystemId(this.getStylesheetProcessor().getDOMsystemID());