Re: [xsl] Converting a string to Uppercase or Lowercase without using translate() ?

Subject: Re: [xsl] Converting a string to Uppercase or Lowercase without using translate() ?
From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Nov 2007 16:54:37 +0000
On Tue, Nov 27 2007 14:03:20 +0000, gkholman@xxxxxxxxxxxxxxxxxxxx wrote:
...
>>Out of interest - why in this case would you prefer using entities
>>over variables?  My advice would be to avoid entities, I don't see any
>>benefit here (or in most cases, so I'm approaching this from an
>>already negative angle :) ....  especially for people new to XSLT.
>
> I suppose ... I guess I see the problem as a lexical issue and not an
> algorithmic issue.  I cannot comment on optimization opportunities for
> XSLT engines when faced with an explicit string or a variable
> reference ... perhaps someone on the list can comment on this.

I've made both an entity for an en-dash and a variable for a colour in
the last two days, but I think variables are more useful since one
declaration can suffice for a modular set of stylesheets.

A variable can be visible in other files that include/import or are
included/imported by the file (i.e., the entity, in another sense of the
term) that contains the top-level variable declaration, whereas the
entity is for one file (unless you get into using external parsed
entities instead of include/import).

Regards,


Tony.
======================================================================
Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx   http://www.menteithconsulting.com

Menteith Consulting Ltd             Registered in Ireland - No. 428599
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
----------------------------------------------------------------------
Menteith Consulting -- Understanding how markup works
======================================================================

Current Thread