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

Subject: Re: [xsl] starts-with on more than one item
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 2 Jun 2008 17:36:05 +0100
> 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. 
________________________________________________________________________

Current Thread