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

Posted by Ryan Puddephatt on
URL: https://discuss.orbeon.com/apostroph-in-group-separator-xxforms-format-tp32790p32793.html

Well there is one way, but it's a bit hacky. You could store an element in
an instance which contains '. E.g.

<instance>
        <apos>'</apos>
</instance>

And then refer to it

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

This could work :-)

Ryan

Ryan Puddephatt
Software Engineer

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108

 

>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]]
>Sent: 13 February 2007 15:20
>To: [hidden email]
>Subject: Re: Re: [ops-users] apostroph in group-separator
>(@xxforms:format)
>
>> Ryan :
>> I think you need to escape it (&apos;)
>
>I've already try it but &apos; 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 4 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