0
votes

I've got an xform with an output element that references a "time" node in my model that contains a string something like "00:12:34,567". I'd like the text of the output element to be the substring "00:12:34". I didn't quite expect this to work but maybe you'll get what I'm trying to do.

<xf:output ref="substring-before(//time[1],',')">
    <xf:label>Time</xf:label>
</xf:output>
1

1 Answers

0
votes

A ref attribute pointing to an atomic value should work as per XForms 2.0, but maybe your implementation doesn't support this feature yet. So try to use the value attribute, which is more appropriate here anyway:

<xf:output value="substring-before(//time[1],',')">
    <xf:label>Time</xf:label>
</xf:output>