Search code examples
xforms

Way in XForms to output element name


I have a xf:repeat over a set of elements that aren't all the same name, using a selector like <xf:repeat ref="root/foo/*">. I've been trying to make it print a label for each element that gets displayed, based on the name. But the following doesn't work:

<xf:output ref="name(.)" />

Neither does anything that references the specific node:

<xf:output ref="name(root/foo/bar)" />

Does XForms support outputting the current element's name?


Solution

  • You should use xf:output/@value instead of xf:output/@ref