xsl-list
[Top] [All Lists]

Re: [xsl] Conditional Setting of a locale

2008-05-16 07:10:20
On Fri, May 16 2008 14:05:42 +0100, 
mark(_dot_)anderson(_at_)technique-group(_dot_)com wrote:
So I'd have to do this everytime I format a number. Was hopign for a way to 
set it once at the top of the file.

You could put the common logic in a named template that you call using
xsl:call-template and passing the number as a parameter each time.

If your XSLT 1.0 processor supports EXSLT's func:function [1], then you
have the option of making a function for the common logic.  Using an
EXSLT function would be more concise, but it's also potentially less
portable between XSLT processors.

Regards,


Tony Graham                         
Tony(_dot_)Graham(_at_)MenteithConsulting(_dot_)com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2



[1] http://www.exslt.org/func/elements/function/index.html

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