cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: XMLForm and concatenation in view: possible bug?
Date Wed, 16 Apr 2003 15:05:38 GMT

You want to say that it's possible to do something like this?:

<xf:selectOne ref="/appId" selectUIType="listbox">
  <xf:caption>Application responsible</xf:caption>
  <xf:itemset nodeset="persons_col">
    <xf:caption><output ref="lastName"/><output ref="firstName"></caption>
    <xf:value ref="personId"/>

Sylvain (T)

-----Message d'origine-----
De: Konstantin Piroumian []
Date: mercredi, 16. avril 2003 16:40
Objet: Re: XMLForm and concatenation in view: possible bug?

As I wrote in the previous message, XMLForm framework should create XPaths
itself, it should use underlying JXPath mechanisms to create correct
expression evaluation context. Basically, instead of simply appending
'/person[1]' it should create a context with the parent node and then
evaluate your expression, which will be correct in that case. This is very
similar to behavior of <xsl:for-each ...>.

In your case it would be maybe easier to try to use <xf:output ref=""/>
side-by-side (if that's allowed inside of the <xf:caption/>). If not then
you should probably try to fix the XMLForms transformer.


----- Original Message -----
From: <>
To: <>
Sent: Wednesday, April 16, 2003 18:32
Subject: RE: XMLForm and concatenation in view: possible bug?


If I understand, the problem is that the path /person_col[1]/yourexpression
is NOT a valid and correct path.

In other words, with this code:
<xf:itemset nodeset="persons_col">
  <xf:caption ref="concat(lastName, firstName)"/>

XMLForm creates the paths:
/person_col[1]/concat(lastName, firstName)
/person_col[2]/concat(lastName, firstName)

which are not correct.

It should maybe creates something like:
/person_col[1]/lastName + /person_col[1]/firstName
/person_col[2]/lastName + /person_col[2]/firstName

Am I right or totally out of the subject?

Sylvain (T)

-----Message d'origine-----
De: Torsten Curdt []
Date: mercredi, 16. avril 2003 16:17
Objet: Re: XMLForm and concatenation in view: possible bug?

> Hi Torsten,
> Sorry but I don't understand.
> Could you explain in more details?

Sure. I give it a try...

You basically define to loop through some items.
Each item has it's unique absolute ref/path.
XMLForm needs to create this path for the individual item.


but you put an expression into the ref


which is of course wrong. You would need to
tell XMLForm "don't prepend" and you would need
to set an absolute ref (using the iterator) by yourself.

AFAIK that's currently not possible.

View raw message