Hi Peter,
> Let's say we have a refentry for "foo", so it would be nice to write
>
> You can use commands <xref linkend="foo-refentry"/> or
> <command>bar</command> for this.
depending on what you want to achieve (and what your documentation
processes are), maybe using entities instead is a more viable solution?
This (maybe in a separate "command.ent")
<!ENTITY foo "<command>foo</command>">
<!ENTITY bar "<command>bar</command>">
will lead to this
"You can use commands &foo; or &bar; for this."
Use the entity files "function.ent" and "envar.ent" respectively.
Regards
Michael