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 2001/01/29 12:47:34 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/templates ElemCallTemplate.java
sboag 01/01/29 03:47:34
Modified: java/src/org/apache/xalan/templates ElemCallTemplate.java
Log:
Fix problem with template mutation during runtime. The resolution of the
template is now done in the compose() method.
Revision Changes Path
1.15 +16 -6 xml-xalan/java/src/org/apache/xalan/templates/ElemCallTemplate.java
Index: ElemCallTemplate.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemCallTemplate.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ElemCallTemplate.java 2001/01/26 01:26:58 1.14
+++ ElemCallTemplate.java 2001/01/29 11:47:31 1.15
@@ -142,6 +142,22 @@
{
return Constants.ELEMNAME_CALLTEMPLATE_STRING;
}
+
+ /**
+ * This function is called after everything else has been
+ * recomposed, and allows the template to set remaining
+ * values that may be based on some other property that
+ * depends on recomposition.
+ */
+ public void compose()
+ {
+ super.compose();
+ if ((null != m_templateName) && (null == m_template))
+ {
+ m_template =
+ this.getStylesheetRoot().getTemplateComposed(m_templateName);
+ }
+ }
/**
* Invoke a named template.
@@ -160,12 +176,6 @@
if (TransformerImpl.S_DEBUG)
transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
-
- if (null == m_template)
- {
- m_template =
- this.getStylesheetRoot().getTemplateComposed(m_templateName);
- }
if (null != m_template)
{