Handle input and output body namespace

Handle input and output body namespace when the tag is encoded i.e
"use=encoded" and the namespace is specified.