|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Newbie question with XSL and functions
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








