Bob,

The XPath expression in the "ref" attribute is not evaluated at the
same time as XPath expressions in the XSLT document are. It is
evaluated by the XForms engine later on, which does not have any
information about the $entryPosition variable. What you have to do is
generate an XPath expression without variables. You can do this as
follows:

ref="/e:envelope/ts:CDETimesheet/ts:CDETimesheetEntries/ts:CDETimesheetEntry[{$entryPosition}]/ts:Projects/ts:Project/ts:Hours"

This works because all element attributes in XSLT are interpreted as
"attribute value templates", which means that they are templates where
values within brackets {} are evaluated and replaced within the
template. With the example above, {$entryPosition} is replaced with
the value of the $entryPosition variable in the attribute.

-Erik

Bob Daly wrote:

> Hi,
> I'm having a problem with the following line (the xforms:input does not
> display at all):
> <xforms:input
> ref="/e:envelope/ts:CDETimesheet/ts:CDETimesheetEntries/ts:CDETimesheetEntry[$entryPosition]/ts:Projects/ts:Project/ts:Hours" d:size="20" />
>
> I know the variable $entryPosition is correct; are variables resolved
> correctly in the ref content? There is no problem with this when
> $entryPosition is hard-coded.
>
> -bob daly



_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users

Reply via email to