Am 16.06.2012 um 12:24 schrieb Meer, H. van der:

Using \startxtable gives an error, whereas \startembeddedxtable does not. What is the cause, what is the difference?

That’s a side effect of the implementation of the buffer mechanism which is used by xtables, as a result of this you can’t use buffer environments in the argument of another command.

Error: Runaway argument?
\xmlflush {test::4}\stopxtable  \endgroup 
\stoptext
! File ended while scanning use of \buff_gobble.

Working:
\startxmlsetups xmlcommon:table 
\startembeddedxtable[
\xmlflush{#1}
\stopembeddedxtable
\stopxmlsetups

Not working:
\startxmlsetups xmlcommon:table
\startxtable
\xmlflush{#1}
\stopxtable
\stopxmlsetups

Calling this with:
\usemodule[hvdm-xml] % contains simple definitions for <table> <tr> <td> through \startxcell etc.

The version of your module on tlcontrib don’t contain such definitions.

Wolfgang