Re: Re: apostroph in group-separator (@xxforms:format)

Posted by f.blanc on
URL: https://discuss.orbeon.com/apostroph-in-group-separator-xxforms-format-tp32790p32792.html

> Ryan :
> I think you need to escape it (')

I've already try it but ' is not escaped :'o(

<xforms:output ref="/double" xxforms:format="format-number(., '###&apos;##0.00')" />
==> unmatched quote in expression

> Erik :
> translate is your friend

And with translate I've try this :

<xforms:output ref="/double" xxforms:format="translate(format-number(., '###,##0.00'), '&apos;'" />

and this

<xforms:output ref="/double" xxforms:format="translate(format-number(., '###,##0.00'), &apos;" />

but I receive always "unmatched expression" : the &apos; cannot be escaped and there is no way of calling a variable as in xslt...

In XSL we can have variable and it works (as I said in the first post) but I need to use the @xxforms:format...

Here with xsl it works but How can I do the same in the @xxforms:format (call a variable)
<xsl:template name="displayMoney">
  <xsl:param name="number" select="0"/>
  <xsl:variable name="apos">'</xsl:variable>
  <xsl:value-of select="translate(format-number($number, '###,###,###.00 CHF'), ',', $apos)"/>
</xsl:template>

And I've even try to have the ' character in my XFormsInstance (!) and call it in the translate function but : an empty sequence is not allowed as the third argument of translate()...

The only solution I've found is to use the ยด character in state of '...
But if you find a solution, I'm interested in.

Thanks




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws