You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@locus.apache.org on 2000/12/12 17:43:59 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/templates ElemLiteralResult.java ElemTemplateElement.java
mmidy 00/12/12 08:43:58
Modified: java/src/org/apache/xalan/templates ElemLiteralResult.java
ElemTemplateElement.java
Log:
Fix problem with exclude-result-prefix and Litteral Result ELements
Revision Changes Path
1.16 +22 -3 xml-xalan/java/src/org/apache/xalan/templates/ElemLiteralResult.java
Index: ElemLiteralResult.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemLiteralResult.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ElemLiteralResult.java 2000/12/09 19:34:52 1.15
+++ ElemLiteralResult.java 2000/12/12 16:43:55 1.16
@@ -262,7 +262,26 @@
}
}
}
-
+
+ /**
+ * Return whether we need to check namespace prefixes
+ * against and exclude result prefixes list.
+ * Note that this will create a new prefix table if one
+ * has not been created already.
+ */
+ boolean needToCheckExclude()
+ {
+ if (null == m_excludeResultPrefixes && null == m_prefixTable)
+ return false;
+ else
+ {
+ // Create a new prefix table if one has not already been created.
+ if (null == m_prefixTable)
+ m_prefixTable = new Vector();
+ return true;
+ }
+ }
+
/**
* The namespace of the element to be created.
*/
@@ -600,8 +619,8 @@
{
child.resolvePrefixTables();
}
- }
- */
+ }*/
+
/**
* Copy a Literal Result Element into the Result tree, copy the
1.33 +10 -1 xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java
Index: ElemTemplateElement.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- ElemTemplateElement.java 2000/12/10 05:23:21 1.32
+++ ElemTemplateElement.java 2000/12/12 16:43:56 1.33
@@ -876,7 +876,7 @@
// The prefix table of the parent should never be null!
Vector prefixes = parent.m_prefixTable;
- if (null == m_prefixTable)
+ if (null == m_prefixTable && !needToCheckExclude())
{
// Nothing to combine, so just use parent's table!
@@ -918,6 +918,15 @@
child.resolvePrefixTables();
}
}
+
+ /**
+ * Return whether we need to check namespace prefixes
+ * against and exclude result prefixes list.
+ */
+ boolean needToCheckExclude()
+ {
+ return false;
+ }
/**
* Send startPrefixMapping events to the result tree handler