cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Sylvain.The...@swisscom.com>
Subject RE: XMLForm and concatenation in view: possible bug?
Date Wed, 16 Apr 2003 13:33:11 GMT
Hi Konstantin,

Sorry for this misunderstanding!

Here is my view code with your new "ref":

<xf:selectOne ref="/appId" selectUIType="listbox">
  <xf:caption>Application responsible</xf:caption>
  <xf:itemset nodeset="persons_col">
    <xf:caption ref="concat(/persons_col[1]/lastName, /persons_col[1]/firstName)"/>
    <xf:value ref="personId"/>
  </xf:itemset>
</xf:selectOne> 


But there is still an error:

org.apache.cocoon.ProcessingException: Failed to execute pipeline.: org.apache.commons.jxpath.JXPathException:
Invalid XPath: '/persons_col[1]/concat(/persons_col[1]/lastName, /persons_col[1]/firstName)'.
Syntax error after: '/persons_col[1]/c' 


Could you help me to understand this?

Thanks
Sylvain (T)



-----Message d'origine-----
De: Konstantin Piroumian [mailto:kpiroumian@apache.org]
Date: mercredi, 16. avril 2003 14:15
À: cocoon-dev@xml.apache.org
Objet: Re: XMLForm and concatenation in view: possible bug?


You didn't told me that you are using some different XPath
(/persons_col[1]/concat(lastName, firstName) <- this is not a correct XPath.
You should use this instead:

ref="concat(/persons_col[1]/lastName, /persons_col[1]/firstName)"

hopefully this should work.

Please follow the recommendations carefully.

Konstantin

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


Hello,

I have a Collection object which contains some attributes (applicationId,
applicationName, applicationVersion).

In a XMLForm view I need to display more than one attribute per "output",
like:

<xf:selectOne ref="/appId">
  <xf:itemset nodeset="applications">
    <xf:caption ref="applicationName + applicationVersion"/>
<=concatenation
    <xf:value ref="applicationId"/>
  </xf:itemset>
</xf:selectOne>

Konstantin has told me to try:
<xf:caption ref="concat(applicationName, applicationVersion)"/>

But it doesn't work. Error:
org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
org.apache.commons.jxpath.JXPathException: Invalid XPath:
'/persons_col[1]/concat(lastName, firstName)'. Syntax error after:
'/persons_col[1]/c'

Is someone could tell why this doesn't work?

Thanks
Sylvain (T)



Mime
View raw message