xsl-list
[Top] [All Lists]

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

2007-11-27 09:56:12
On Tue, Nov 27 2007 14:03:20 +0000, gkholman(_at_)CraneSoftwrights(_dot_)com 
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(_dot_)Graham(_at_)MenteithConsulting(_dot_)com   
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
======================================================================

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