Re: [xsl] xsl:function

Subject: Re: [xsl] xsl:function
From: Abel Braaksma <>
Date: Wed, 12 Sep 2007 08:43:50 +0200
Karanam.Chowdary@xxxxxxxxxxxxxxxxxx wrote:
I m very new to XSL and XML just strtd working 10 days back.
I hv a problem in using <xsl:function>. What's the name space to be
given? Shud I give a valid name space which contains the functions?

<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet xmlns:xsl="";
version="2.0" xmlns:xs="";
xmlns:my="http://whatever"; exclude-result-prefixes="my">
<xsl:function name="my:one">
<xsl:param name="a"/>
<xsl:param name="b"/>
<xsl:result select="$a+$b"/>

<xsl:template match="/">
<xsl:value-of select="my:one(1,1)"/>
What is the mistake here? Am I missing sumthing?

No, you are not missing anything, there is no mistake. Should there be? Is there an error you get?

-- Abel Braaksma

Current Thread