W3C home > Mailing lists > Public > public-xformsusers@w3.org > April 2012

showing relationships in xforms

From: Kevin Flynn <kemifl@gmail.com>
Date: Mon, 16 Apr 2012 13:48:50 +0200
Message-ID: <CALN+H_J-mp_0R6Cvud6ieacMK=JSX-kDW-RcP6YWhDRJYbFEkQ@mail.gmail.com>
To: public-xformsusers@w3.org
Hi,

I'm currently experimenting with xforms and having difficulty displaying
information about relationships. Given a data instance like this:

<persons>
 <person>
  <id>marx</id>
  <name>Karl Marx</name>
 </person>
 <person>
  <id>engels</id>
  <name>Friedrich Engels</name>
  <friend>marx</friend>
 </person>
</persons>

I would expect to be able to display "Karl Marx" from the context
/persons/person[id='engels'] by doing something like:

<xforms:output ref="instance('persons')/person[id=current()/friend]/name"/>

....but, needless to say, I can't.

I realize that the current() function I'm used to from XSLT is not
available in XForms (I use it above for illustration), but I presume that
there must be something functionally equivalent... Can anybody enlighten me?

I'm using Orbeon forms, if that is significant.

Hope somebody can help

Kevin Flynn
Received on Monday, 16 April 2012 16:09:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:48:23 UTC