[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Newbie question with XSL and functions

Subject: RE: Newbie question with XSL and functions
From: Linda van den Brink <lvdbrink@xxxxxxx>
Date: Thu, 15 Jun 2000 16:04:41 +0200
xsl decimal degrees minutes
> I am new to using XSL and have a question.  I have a 
> conversion that I need
> to do over and over again on a certain type of data through-out my
> stylesheet.  I was wondering if there is a concept of a 
> function in XSL that
> I can pass in some text and get it back formatted in a 
> different way.  If
> there is, could I get sometype of example code segment or a 
> link of where I
> might be able to find something on-line.  The conversion I 
> need to do is to
> transform a decimal degrees value to a degrees:minutes:second format.

I'd probably create a named template like this: 
<xsl:template name="formattext">
do the transform here
</xsl:template>

And call this template whenever I needed it like this: 
<xsl:call-template name="formattext"/>

You could pass in the text you want to transform as a variable using
xsl:with-param. 

The exact code you would use for the transforming itself depends on the way
your input strings look and the output you want (and keep in mind that I
don't know what a decimal degrees value looks like), but a whole set of
string functions as well as the translate function is available within XSLT.
Have a look at them... 

Linda


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.