This commit was manufactured by cvs2svn to create tag
'xalan-j_2_5_D1'.
git-svn-id: https://svn.apache.org/repos/asf/xalan/java/tags/xalan-j_2_5_D1@337304 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/org/apache/xalan/transformer/TrAXFilter.java b/src/org/apache/xalan/transformer/TrAXFilter.java
index 2ee47c1..7b45918 100644
--- a/src/org/apache/xalan/transformer/TrAXFilter.java
+++ b/src/org/apache/xalan/transformer/TrAXFilter.java
@@ -96,14 +96,6 @@
m_transformer = (TransformerImpl)templates.newTransformer();
}
- /**
- * Return the Transformer object used for this XML filter.
- */
- public TransformerImpl getTransformer()
- {
- return m_transformer;
- }
-
/** Set the parent reader.
*
* <p>This is the {@link org.xml.sax.XMLReader XMLReader} from which
diff --git a/src/org/apache/xalan/xsltc/compiler/util/ReferenceType.java b/src/org/apache/xalan/xsltc/compiler/util/ReferenceType.java
index 380f7f4..38ff604 100644
--- a/src/org/apache/xalan/xsltc/compiler/util/ReferenceType.java
+++ b/src/org/apache/xalan/xsltc/compiler/util/ReferenceType.java
@@ -64,8 +64,6 @@
package org.apache.xalan.xsltc.compiler.util;
-import org.apache.xalan.xsltc.DOM;
-import org.apache.bcel.generic.PUSH;
import org.apache.bcel.generic.ALOAD;
import org.apache.bcel.generic.ASTORE;
import org.apache.bcel.generic.ConstantPoolGen;
@@ -98,13 +96,13 @@
}
/**
- * Translates a reference to an object of internal type <code>type</code>.
+ * Translates a reference to an object of internal type <code>type</code>.
* The translation to int is undefined since references
* are always converted to reals in arithmetic expressions.
*
* @see org.apache.xalan.xsltc.compiler.util.Type#translateTo
*/
- public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
Type type) {
if (type == Type.String) {
translateTo(classGen, methodGen, (StringType) type);
@@ -134,26 +132,20 @@
}
/**
- * Translates reference into object of internal type <code>type</code>.
+ * Translates reference into object of internal type <code>type</code>.
*
* @see org.apache.xalan.xsltc.compiler.util.Type#translateTo
*/
- public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
StringType type) {
final int current = methodGen.getLocalIndex("current");
ConstantPoolGen cpg = classGen.getConstantPool();
InstructionList il = methodGen.getInstructionList();
- // If no current, conversion is a top-level
- if (current < 0) {
- il.append(new PUSH(cpg, DOM.ROOTNODE)); // push root node
- }
- else {
- il.append(new ILOAD(current));
- }
+ il.append(new ILOAD(current));
il.append(methodGen.loadDOM());
final int stringF = cpg.addMethodref(BASIS_LIBRARY_CLASS,
- "stringF",
+ "stringF",
"("
+ OBJECT_SIG
+ NODE_SIG
@@ -163,18 +155,18 @@
}
/**
- * Translates a reference into an object of internal type <code>type</code>.
+ * Translates a reference into an object of internal type <code>type</code>.
*
* @see org.apache.xalan.xsltc.compiler.util.Type#translateTo
*/
- public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
RealType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(methodGen.loadDOM());
- int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "numberF",
- "("
+ int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "numberF",
+ "("
+ OBJECT_SIG
+ DOM_INTF_SIG
+ ")D");
@@ -182,17 +174,17 @@
}
/**
- * Translates a reference to an object of internal type <code>type</code>.
+ * Translates a reference to an object of internal type <code>type</code>.
*
* @see org.apache.xalan.xsltc.compiler.util.Type#translateTo
*/
- public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
BooleanType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
- int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "booleanF",
- "("
+ int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "booleanF",
+ "("
+ OBJECT_SIG
+ ")Z");
il.append(new INVOKESTATIC(index));
@@ -203,17 +195,17 @@
*
* @see org.apache.xalan.xsltc.compiler.util.Type#translateTo
*/
- public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
NodeSetType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
- int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "referenceToNodeSet",
+ int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "referenceToNodeSet",
"("
+ OBJECT_SIG
+ ")"
+ NODE_ITERATOR_SIG);
il.append(new INVOKESTATIC(index));
-
+
// Reset this iterator
index = cpg.addInterfaceMethodref(NODE_ITERATOR, RESET, RESET_SIG);
il.append(new INVOKEINTERFACE(index, 1));
@@ -235,11 +227,11 @@
*
* @see org.apache.xalan.xsltc.compiler.util.Type#translateTo
*/
- public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
ResultTreeType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
- int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "referenceToResultTree",
+ int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "referenceToResultTree",
"(" + OBJECT_SIG + ")" + DOM_INTF_SIG);
il.append(new INVOKESTATIC(index));
}
@@ -249,21 +241,21 @@
*
* @see org.apache.xalan.xsltc.compiler.util.Type#translateTo
*/
- public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
ObjectType type) {
- methodGen.getInstructionList().append(NOP);
+ methodGen.getInstructionList().append(NOP);
}
/**
- * Translates a reference into the Java type denoted by <code>clazz</code>.
+ * Translates a reference into the Java type denoted by <code>clazz</code>.
*/
- public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
Class clazz) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
-
+
if (clazz.getName().equals("java.lang.Object")) {
- il.append(NOP);
+ il.append(NOP);
}
else if (clazz == Double.TYPE) {
translateTo(classGen, methodGen, Type.Real);
@@ -272,20 +264,20 @@
translateTo(classGen, methodGen, Type.String);
}
else if (clazz.getName().equals("org.w3c.dom.Node")) {
- int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "referenceToNode",
- "("
- + OBJECT_SIG
- + DOM_INTF_SIG
+ int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "referenceToNode",
+ "("
+ + OBJECT_SIG
+ + DOM_INTF_SIG
+ ")"
+ "Lorg/w3c/dom/Node;");
il.append(methodGen.loadDOM());
il.append(new INVOKESTATIC(index));
}
else if (clazz.getName().equals("org.w3c.dom.NodeList")) {
- int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "referenceToNodeList",
- "("
- + OBJECT_SIG
- + DOM_INTF_SIG
+ int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "referenceToNodeList",
+ "("
+ + OBJECT_SIG
+ + DOM_INTF_SIG
+ ")"
+ "Lorg/w3c/dom/NodeList;");
il.append(methodGen.loadDOM());
@@ -305,27 +297,27 @@
* Translates an external Java type into a reference. Only conversion
* allowed is from java.lang.Object.
*/
- public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen,
+ public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen,
Class clazz) {
if (clazz.getName().equals("java.lang.Object")) {
- methodGen.getInstructionList().append(NOP);
+ methodGen.getInstructionList().append(NOP);
}
else {
ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
toString(), clazz.getName());
classGen.getParser().reportError(Constants.FATAL, err);
- }
+ }
}
/**
* Expects a reference on the stack and translates it to a non-synthesized
- * boolean. It does not push a 0 or a 1 but instead returns branchhandle
+ * boolean. It does not push a 0 or a 1 but instead returns branchhandle
* list to be appended to the false list.
*
* @see org.apache.xalan.xsltc.compiler.util.Type#translateToDesynthesized
*/
- public FlowList translateToDesynthesized(ClassGenerator classGen,
- MethodGenerator methodGen,
+ public FlowList translateToDesynthesized(ClassGenerator classGen,
+ MethodGenerator methodGen,
BooleanType type) {
InstructionList il = methodGen.getInstructionList();
translateTo(classGen, methodGen, type);
@@ -334,14 +326,14 @@
/**
* Translates an object of this type to its boxed representation.
- */
+ */
public void translateBox(ClassGenerator classGen,
MethodGenerator methodGen) {
}
/**
* Translates an object of this type to its unboxed representation.
- */
+ */
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
}
@@ -350,7 +342,7 @@
public Instruction LOAD(int slot) {
return new ALOAD(slot);
}
-
+
public Instruction STORE(int slot) {
return new ASTORE(slot);
}
diff --git a/src/trax/trax.properties b/src/trax/trax.properties
deleted file mode 100644
index e593c39..0000000
--- a/src/trax/trax.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-# $Revision$ $Date$
-#
-# Note: This properties file is provided for illustrative purposes
-# only and is not part of the interface definition.
-# This properties file is located in the implementation JAR
-# and different implementations will specify different
-# implementation classes and output methods.
-#
-
-# The TRaX Stylesheet processor
-trax.processor.xslt=org.apache.xalan.processor.StylesheetProcessor