[xslt] func:result not recognized



Hello,

I'm attempting to use <func:function>, but it seems that <func:result/> is 
not being recognized.  Given the following...


<?xml version="1.0"?>

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
            xmlns:my="my"
            xmlns:func="http://exslt.org/functions";
            version="1.0">

    <func:function name="my:func">
            <func:result select="1"/>
            <more/>
    </func:function>

    <xsl:template match="/">
            <xsl:value-of select="my:func()"/>
    </xsl:template>

</xsl:transform>


...xsltproc says:


  ELEMENT fake
PBM: Node has no parent
    ELEMENT func:result
      namespace func href=http://exslt.org/functions
      namespace my href=my
      ATTRIBUTE select
        TEXT
          content=1
    ELEMENT more
      namespace my href=my
      namespace func href=http://exslt.org/functions
{my}func: cannot write to result tree while executing a function
xmlXPathCompiledEval: evaluation failed
runtime error: file test.xslt line 14 element value-of
xsltValueOf: text copy failed


It seems that <func:result/> is not being recognized, but I do not know why. 
  xsltproc --dumpextensions says:


[...]
Registered Extension Elements:
{http://exslt.org/common}document
{http://exslt.org/functions}result
{http://xmlsoft.org/XSLT/}test


...so it appears that the extensions are being registered.  Does anyone know 
why this might be failing?

Thanks,
-Brett

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]