Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Smooks v1.2
-
Component/s: Smooks Core
-
Labels:None
-
Number of attachments :
Description
At the moment, Smooks is quite finicky in terms of how it requires the configurations to be ordered in the configuration file. In order to get Smooks to work properly, you may have to order the resources in a way that is not in line with the logical flow of the solution you are creating. This is something that has been buging people for a while now.
The solution we've come up with with to allow Visitor logic to implement Producer and Consumer interfaces. From this, Smooks can sort the execution of visitor logic in cases where more than one visitor is targetted at a single element/fragment. It sorts the visitors such as to guarantee that Producers are executed before Consumers.
This can be turned off (to revert back to the behavior of v1.1 and before) by configuring the global parameter "smooks.visitors.sort".