cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivelin Ivanov" <ive...@apache.org>
Subject Re: XMLForm - xf:repeat tag on DOM Nodes?
Date Sat, 09 Nov 2002 19:15:18 GMT

You probably meant to use:


 <xf:repeat nodeset="/productNode/product/description">
  <xf:textbox ref="@lang">
   <xf:caption>Language (code):</xf:caption>
   <xf:violations class="error"/>
  </xf:textbox>
  <xf:textbox ref=".">
   <xf:caption>Description:</xf:caption>
   <xf:violations class="error"/>
  </xf:textbox>
 </xf:repeat>

I would also recommend that you use the standard xml:lang attribute instead
of a non-qualified one.



Ivelin




----- Original Message -----
From: "Josema Alonso" <alonso@aafunky.com>
To: "Cocoon-Users" <cocoon-users@xml.apache.org>
Sent: Saturday, November 09, 2002 12:40 PM
Subject: XMLForm - xf:repeat tag on DOM Nodes?


> Dear all,
>
> I see in thw wizrd demo how the repeat tag is used like this:
> <xf:repeat nodeset="favorite[position() &lt;= 3]" id="favorites">
>  <xf:textbox ref="." class="info">
>   <xf:caption>URL: </xf:caption>
>  </xf:textbox>
> </xf:repeat>
>
> In the model bean the favorite is implemented as an array list, so you can
> iterate through it using the position function and specifying how many
items
> to display.
>
> Well, now I got a part of my model implmented as a DOM Node. It seems it'w
> working right but I can't make the repeat tag to work with it. Let's say I
> have something like this:
> <product>
>     <description lang="en">nice table</description>
>     <description lang="es">mesa bonita</description>
> </product>
>
> I want to display as many textboxes as descriptions, ok? I have tried
this,
> but unfortunately it is not working. :
> <xf:repeat nodeset="/productNode/product">
>  <xf:textbox ref="description/@lang">
>   <xf:caption>Language (code):</xf:caption>
>   <xf:violations class="error"/>
>  </xf:textbox>
>  <xf:textbox ref="description">
>   <xf:caption>Description:</xf:caption>
>   <xf:violations class="error"/>
>  </xf:textbox>
> </xf:repeat>
>
> If I try to access just one description node outside the repeat tag, I get
> the info correctly. Any ideas?
>
> Thanks.
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message