W3C home > Mailing lists > Public > www-forms-editor@w3.org > September 2006

Suggestion for supporting recursive XML structures in XForms

From: Pepijn Noltes <pepijnnoltes.ml@gmail.com>
Date: Tue, 19 Sep 2006 11:29:51 +0200
Message-ID: <1177d2350609190229w32bd2cf8w1281689866407862@mail.gmail.com>
To: www-forms-editor@w3.org

I'm a big fan of XForms and absolutely love it for the fact that a lot of
functionality can be achieved with a few line of XForms.

But one problem I keep bumbing into is that XForms cannot handle XML
with a recursive structure.
I solve this by generating the XForms in XQuery , but would prefer to do
with static XForms.

To clarify what I mean I developed a example (with uses XBL) for proof the
This example works under Firefox (with the XForms-plugin 0.6)
and is attached to this mail.

I think this would be a great feature for XForms 1.1, but than more neatly

  <xf:instance xmlns="" id="list">
      <section name="1">
        <section name="1-1">
          <section name="1-1-1">
      <section name="2">

<xf:group ref="instance('list')">
  <xf:repeat id="section-repeat" nodeset="section">
      <xf:output ref="@name">
        <xf:label>section name: </xf:label>
    <xf:repeat nodeset="paragraph">
      <xf:output ref=".">
        <xf:label>paragraph: </xf:label>
    <xf:repeat recurrentRepeat="section-repeat"/>

This should work great in combination with a xf:insert with the context
and origin parameters

Of course problems like duplicated id for the xf:repeat and xf:case should
though about, IMHO solveable (reference to id works in the current "repeat

Would this be something to consider adding to the XForms specification ?


 Pepijn Noltes
 Software Engineer
 Topic Embedded Systems
 The Netherlands

Received on Tuesday, 19 September 2006 09:30:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:25:11 UTC