cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <kpiroum...@apache.org>
Subject Re: XMLForm and concatenation in view: possible bug?
Date Wed, 16 Apr 2003 14:39:47 GMT
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.

Konstantin

----- Original Message -----
From: <Sylvain.Thevoz@swisscom.com>
To: <cocoon-dev@xml.apache.org>
Sent: Wednesday, April 16, 2003 18:32
Subject: RE: XMLForm and concatenation in view: possible bug?


Torsten,

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?

Regards
Sylvain (T)



-----Message d'origine-----
De: Torsten Curdt [mailto:tcurdt@dff.st]
Date: mercredi, 16. avril 2003 16:17
À: cocoon-dev@xml.apache.org
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.

/person_col[1]/whatever
/person_col[2]/whatever
...

but you put an expression into the ref

/person_col[1]/yourexpression
/person_col[2]/yourexpression

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.
--
Torsten



Mime
View raw message