xsl-list
[Top] [All Lists]

Re: [xsl] starts-with on more than one item

2008-06-02 09:36:31

Adding a test inside the position()=last() 
clause accounts for the case of two members, which presumably 
shouldn't get a comma between them.

Putting a , before the and in a list is anyway a transatlantic
peversion, so in English as (usually) practiced in England 
you could lose the
     <xsl:if test="position() > 2">
       <xsl:text>,</xsl:text>
     </xsl:if>

The problem of transposing from singular to plural forms reliably in 
English requires either NLP or at least a lookup table with all your 
possible terms;

true but in this case the vocabulary is probably fairly restricted, so a
lookup table plus a fallback case of sticking an s on the end for
anything not in the table is probably workable.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

--~------------------------------------------------------------------
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>