The language support in the Scala DSL is too simplistic in that it does not support all the options of Java DSL.
In particular it does not allow setting the return type of the expression. In my case I am trying to set a header to the result of an xpath count expression. In the Java DSL this fails unless you explicitly set the return type of the xpath expression because the default return type for xpath is a node set and it cannot convert a number to a node set. It also lacks all the other overloads for things like Namespaces on xpath, etc. -- Dale King