Any function to capitalize a text?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Any function to capitalize a text?

richhl
for doing something like this:

<xforms:output value="capitalize(./text())"/>

greetings

rich


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Any function to capitalize a text?

Ryan Puddephatt-3
upper-case(./text())

standard xpath 2.0!

-----------------------------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
Email: [hidden email]
Web: http://www.latentzero.com


-----Original Message-----
From: Richard C. Hidalgo Lorite [mailto:[hidden email]]
Sent: 08 October 2008 14:02
To: [hidden email]
Subject: [ops-users] Any function to capitalize a text?

for doing something like this:

<xforms:output value="capitalize(./text())"/>

greetings

rich


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Any function to capitalize a text?

richhl
On Wed, 8 Oct 2008 14:04:59 +0100
"Ryan Puddephatt" <[hidden email]> wrote:

you're great! thx

any idea of why am I getting this error:

A sequence of more than one item is not allowed as the first argument of upper-case() ("Transferencias cama / sillón", "", ...)

from this sentence:

<xforms:label><xhtml:p><xforms:output value="upper-case(xxforms:context('bucleDePreguntas')/text())"/></xhtml:p></xforms:label>

thx

rich


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Any function to capitalize a text?

Ryan Puddephatt-3
Because you passing a sequence of text nodes, try passing upper-case(xxforms:context('bucleDePreguntas'))

Or upper-case(xxforms:context('bucleDePreguntas')/text()[1])

Ryan
-----------------------------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
Email: [hidden email]
Web: http://www.latentzero.com

-----Original Message-----
From: Richard C. Hidalgo Lorite [mailto:[hidden email]]
Sent: 08 October 2008 14:39
To: [hidden email]
Subject: [ops-users] Re: RE: Any function to capitalize a text?

On Wed, 8 Oct 2008 14:04:59 +0100
"Ryan Puddephatt" <[hidden email]> wrote:

you're great! thx

any idea of why am I getting this error:

A sequence of more than one item is not allowed as the first argument of upper-case() ("Transferencias cama / sillón", "", ...)

from this sentence:

<xforms:label><xhtml:p><xforms:output value="upper-case(xxforms:context('bucleDePreguntas')/text())"/></xhtml:p></xforms:label>

thx

rich

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: RE: Any function to capitalize a text?

richhl
On Wed, 8 Oct 2008 14:43:08 +0100
"Ryan Puddephatt" <[hidden email]> wrote:

> Because you passing a sequence of text nodes, try passing upper-case(xxforms:context('bucleDePreguntas'))
>
> Or upper-case(xxforms:context('bucleDePreguntas')/text()[1])
>
> Ryan

it works! thx


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: RE: Re: RE: Any function to capitalize a text?

Erik Bruchez
Administrator
You can also write simply:

   upper-case(xxforms:context('bucleDePreguntas'))

You usually don't have to use text() if you access attributes or  
elements that only have text content.

-Erik

On Oct 8, 2008, at 7:45 AM, Richard C. Hidalgo Lorite wrote:

> On Wed, 8 Oct 2008 14:43:08 +0100
> "Ryan Puddephatt" <[hidden email]> wrote:
>
>> Because you passing a sequence of text nodes, try passing upper-
>> case(xxforms:context('bucleDePreguntas'))
>>
>> Or upper-case(xxforms:context('bucleDePreguntas')/text()[1])
>>
>> Ryan
>
> it works! thx
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws