You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2002/03/28 20:52:51 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java ProcessorTemplateElem.java
sboag 02/03/28 11:52:51
Modified: java/src/org/apache/xalan/processor StylesheetHandler.java
ProcessorTemplateElem.java
Log:
Addressing http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6752.
Make the processor more robust against multiple failures during compilation.
Revision Changes Path
1.50 +11 -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.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- StylesheetHandler.java 22 Mar 2002 01:04:40 -0000 1.49
+++ StylesheetHandler.java 28 Mar 2002 19:52:50 -0000 1.50
@@ -606,7 +606,7 @@
String uri, String localName, String rawName, Attributes attributes)
throws org.xml.sax.SAXException
{
- NamespaceSupport nssupport = this.getNamespaceSupport();
+ NamespaceSupport nssupport = this.getNamespaceSupport();
nssupport.pushContext();
int n = m_prefixMappings.size();
@@ -654,8 +654,16 @@
XSLTElementProcessor elemProcessor = getProcessorFor(uri, localName,
rawName);
- this.pushProcessor(elemProcessor);
- elemProcessor.startElement(this, uri, localName, rawName, attributes);
+ if(null != elemProcessor) // defensive, for better multiple error reporting. -sb
+ {
+ this.pushProcessor(elemProcessor);
+ elemProcessor.startElement(this, uri, localName, rawName, attributes);
+ }
+ else
+ {
+ m_shouldProcess = false;
+ popSpaceHandling();
+ }
}
1.10 +5 -3 xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplateElem.java
Index: ProcessorTemplateElem.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplateElem.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ProcessorTemplateElem.java 28 Jul 2001 00:25:57 -0000 1.9
+++ ProcessorTemplateElem.java 28 Mar 2002 19:52:50 -0000 1.10
@@ -145,9 +145,11 @@
{
ElemTemplateElement parent = handler.getElemTemplateElement();
-
- parent.appendChild(elem);
- handler.pushElemTemplateElement(elem);
+ if(null != parent) // defensive, for better multiple error reporting. -sb
+ {
+ parent.appendChild(elem);
+ handler.pushElemTemplateElement(elem);
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org