sboag 00/12/27 14:25:42
Modified: java/src/org/apache/xpath DOMHelper.java
Log:
Check for null entities and entity, partly as defensive check if
setDTD has not been called, and also simply for a miss.
Revision Changes Path
1.25 +6 -1 xml-xalan/java/src/org/apache/xpath/DOMHelper.java
Index: DOMHelper.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/DOMHelper.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- DOMHelper.java 2000/12/21 22:32:31 1.24
+++ DOMHelper.java 2000/12/27 22:25:42 1.25
@@ -1120,7 +1120,12 @@
if (null != doctype)
{
NamedNodeMap entities = doctype.getEntities();
+ if(null == entities)
+ return url;
Entity entity = (Entity) entities.getNamedItem(name);
+ if(null == entity)
+ return url;
+
String notationName = entity.getNotationName();
if (null != notationName) // then it's unparsed
@@ -1144,7 +1149,7 @@
{
// This should be resolved to an absolute URL, but that's hard
// to do from here.
- }
+ }
}
}