sboag 00/08/07 14:31:15
Modified: java/src/org/apache/xalan/processor StylesheetHandler.java
Log:
If we're processing from a DOM tree, the Locator will be null... so create a
dummy locator to make folks happy.
Revision Changes Path
1.7 +8 -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.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- StylesheetHandler.java 2000/08/07 03:00:43 1.6
+++ StylesheetHandler.java 2000/08/07 21:31:13 1.7
@@ -947,9 +947,14 @@
*/
public Locator getLocator()
{
- return m_stylesheetLocatorStack.isEmpty()
- ? null :
- ((Locator)m_stylesheetLocatorStack.peek());
+ if(m_stylesheetLocatorStack.isEmpty())
+ {
+ org.xml.sax.helpers.LocatorImpl locator
+ = new org.xml.sax.helpers.LocatorImpl();
+ locator.setSystemId(this.getStylesheetProcessor().getDOMsystemID());
+ m_stylesheetLocatorStack.push(locator);
+ }
+ return ((Locator)m_stylesheetLocatorStack.peek());
}
/**