Hi guys,

I am still struggling with the transformation rules.:-(

My aim is to understand the application of sequence(symbol) in transformation rules.

So, I made a simple test to replace an array of objects in a transformation rule.

The input tree for Transform is:

{ :result => [{ :w => "a" }, { :x => "b" } , { :y => "c", :z => "d"} ] }

and the transformation rule is:

rule( :result => sequence(:elements) ) { puts elements.inspect  }

The new array is: [ "imf", strauss", "kahn"]

The required result should be:   { :result => [ "imf", "strauss", "kahn" ] }

I would be very glad if anyone can provide the solution(s).

Many thanks in advance,

Thiel



Reply via email to