You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dcsobral said:
Both RuleTransformer and RewriteRule depend on the basic engine of def transform(ns: Seq[Node]): Seq[Node]. Perhaps a better question is why have a RuleTransformer at all. The only thing it does different is not recursing on descendants inside def transform(n: Node): Seq[Node], which makes it possible to make an inheritance chain from RuleTransformer, and know it will stop at the identity implementation on RuleTransformer.
Since RuleTransformer does use the recursing characteristic of BasicTransformer, the safety net provided by RuleTransformer provides a certain guarantee of avoiding exponential explosions.
So, overall, I don't think breaking the inheritance here would make things easier instead of harder.
at package scala.xml.transform you've got 3 classes
I think you can make RewriteRule as separate abstract class, because it is inheritance isn't necessary and overcomplicate code.
The text was updated successfully, but these errors were encountered: