> If method is explicitly set to xml though, it should not be stored with method="xhtml" as it currently does.

Right.

> Also, it would be nice to have access to the encoding, version and standalone options on p:store with method="xhtml" as well.
> 

I agree. `version` and `standalone` seem to be already used. I don’t remember why the encoding is forced to utf-8, although it’s probably wanted in 99% of the cases.

Maybe we can just merge the last two `p:when`/`p:otherwise` and better compute the `p:store` options (e.g. depending on the mime type for the method).