xsl-list
[Top] [All Lists]

Re: [xsl] select first word

2007-12-18 09:58:37
Abel Braaksma wrote:

<xsl:value-of select="
        translate(
           substring-before(
               substring-before(.,' '), ', '),
        $from, $to)" />

  If I am right (if I remember correctly) the input doesn't always have
space or comma.  So I would use the following instead (or the result
could be empty):

    translate(replace(., '([^, ]+).*', '$1'), $from, $to)

  Regards,

--drkm






















      
_____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
http://mail.yahoo.fr


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>