You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Evgeniy Strokin <ev...@yahoo.com> on 2002/04/24 21:03:46 UTC
removing carriage return from string
Hi,
I use
translate(string(sts:selectNodeList(/,'.//someTag//')),'
','') to remove all spaces from string. How can I
remove all carriage returns?
Thanks
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/
Re: removing carriage return from string
Posted by Peter Davis <pd...@attbi.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 24 April 2002 12:03, Evgeniy Strokin wrote:
> Hi,
> I use
> translate(string(sts:selectNodeList(/,'.//someTag//')),'
> ','') to remove all spaces from string. How can I
> remove all carriage returns?
In XML, carriage-returns within attribute values are normalized to plain
spaces unless they are escaped with ' ' or similar. Since the XPath
expression is specified as (usually) the select attribute of some XSL tag,
you will have to use such an escape sequence. So you might try this:
<xsl:value-of select="translate($theNode, ' ', '')"/>
If that doesn't work, then I don't know :)
- --
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8x1MjNSZCJx7tYycRAtrvAKDMNyy8BDiCBhnGflH3EAEpZSMhHwCfW26l
9eV8fW4YFv1x8jOS0VkkYFQ=
=tvUm
-----END PGP SIGNATURE-----