xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1348522 - /xalan/java/trunk/src/org/apache/xalan/xsltc/compiler/Sort.java
Date Sun, 10 Jun 2012 01:55:18 GMT
Author: ggregory
Date: Sun Jun 10 01:55:18 2012
New Revision: 1348522

URL: http://svn.apache.org/viewvc?rev=1348522&view=rev
Log:
Fix XALANJ-2546 xsl:sort lang attribute ignores parameter value, only hard-coding works.

Modified:
    xalan/java/trunk/src/org/apache/xalan/xsltc/compiler/Sort.java

Modified: xalan/java/trunk/src/org/apache/xalan/xsltc/compiler/Sort.java
URL: http://svn.apache.org/viewvc/xalan/java/trunk/src/org/apache/xalan/xsltc/compiler/Sort.java?rev=1348522&r1=1348521&r2=1348522&view=diff
==============================================================================
--- xalan/java/trunk/src/org/apache/xalan/xsltc/compiler/Sort.java (original)
+++ xalan/java/trunk/src/org/apache/xalan/xsltc/compiler/Sort.java Sun Jun 10 01:55:18 2012
@@ -67,11 +67,10 @@ final class Sort extends Instruction imp
     private AttributeValue _order;
     private AttributeValue _caseOrder;
     private AttributeValue _dataType;
-    private String  _lang; // bug! see 26869
+    private AttributeValue  _lang; // bug! see 26869, see XALANJ-2546
 
     private String         _data = null;
 
-
     private String _className = null;
     private ArrayList _closureVars = null;
     private boolean _needsSortRecordFactory = false;
@@ -158,10 +157,9 @@ final class Sort extends Instruction imp
 	}
 	_dataType = AttributeValue.create(this, val, parser);
 
-	 _lang =  getAttribute("lang"); // bug! see 26869
-  // val =  getAttribute("lang"); 
-  // _lang = AttributeValue.create(this, val, parser);
-        // Get the case order; default is language dependant
+    val =  getAttribute("lang"); 
+    _lang = AttributeValue.create(this, val, parser);
+    // Get the case order; default is language dependant
     val = getAttribute("case-order");
     _caseOrder = AttributeValue.create(this, val, parser);
 	
@@ -183,6 +181,7 @@ final class Sort extends Instruction imp
 	_order.typeCheck(stable);
 	_caseOrder.typeCheck(stable);
 	_dataType.typeCheck(stable);
+	_lang.typeCheck(stable);
 	return Type.Void;
     }
 
@@ -207,9 +206,7 @@ final class Sort extends Instruction imp
     
     public void translateLang(ClassGenerator classGen,
                    MethodGenerator methodGen) {
-    final ConstantPoolGen cpg = classGen.getConstantPool();
-    final InstructionList il = methodGen.getInstructionList();
-    il.append(new PUSH(cpg, _lang)); // bug! see 26869
+    _lang.translate(classGen, methodGen);
     }
     
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message