roxen.lists.roxen.general

Subject Author Date
Appendix (rxmltags.diff) to: rxmltags.pike diff Marc Dirix <marc[at]electronics-design[dot]nl> 03-10-2006
Index: rxmltags.pike
===================================================================
RCS file: /cvs/Roxen/4.5/server/modules/tags/rxmltags.pike,v
retrieving revision 1.517
diff -u -r1.517 rxmltags.pike
--- rxmltags.pike	16 Jun 2006 12:29:01 -0000	1.517
+++ rxmltags.pike	3 Oct 2006 11:42:53 -0000
@@ -5794,15 +5794,16 @@
     if(arrayp(m->values)) {
       if(m->distinct)
 	m->values = Array.uniq(m->values);
-      return map( m->values,
-		  lambda(mixed val) {
+      return map( indices(m->values),
+		  lambda(int ind) {
+		    mixed val = m->values[ind];
 		    if(m->trimwhites)
 		      val=String.trim_all_whites(RXML.t_string->encode (val));
 		    if(m->case=="upper")
 		      val=upper_case(RXML.t_string->encode (val));
 		    else if(m->case=="lower")
 		      val=lower_case(RXML.t_string->encode (val));
-		    return (["value":val]);
+		    return (["index":ind+1,"value":val]);
 		  } );
     }