Re: [xsl] xsl:function

Subject: Re: [xsl] xsl:function
From: George Cristian Bina <george@xxxxxxxxxxxxx>
Date: Wed, 12 Sep 2007 10:04:34 +0300
What processor are you using?
Saxon 8 for instance gives:

SystemID: C:\george\workspace\oxygen\samples\test.xsl
Location: 8:0
Description: Unknown XSLT element: result
URL: http://www.w3.org/TR/xslt20/#err-XTSE0010

and then it works ok if result is replaced with sequence.

Regards,
George
---------------------------------------------------------------------
George Cristian Bina - http://aboutxml.blogspot.com/
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Karanam.Chowdary@xxxxxxxxxxxxxxxxxx wrote:
But the error is Namespace "http://whatever"; doesn't contain any
functions. Shud I give the name space that is valid? I mean shud that
name space contain functions?

-----Original Message-----
From: Jeff Sese [mailto:jsese@xxxxxxxxxxxx] Sent: Wednesday, September 12, 2007 12:25 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] xsl:function


Karanam.Chowdary@xxxxxxxxxxxxxxxxxx wrote:
Hello,
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="http://www.w3.org/1999/XSL/Transform";
version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema";
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"/>
theres no xsl:result instructions in XSLT... try xsl:sequence instead...

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




DISCLAIMER: This message contains privileged and confidential information and is
intended only for an individual named. If you are not the intended
recipient, you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if
you have received this e-mail by mistake and delete this e-mail from
your system. E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete or contain viruses. The sender,
therefore,  does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.
If verification is required, please request a hard-copy version.



DISCLAIMER:
This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore,  does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.

Current Thread