| Implementer Page: func.result.htmlElement Package: func.result.zip
 Element Syntax<func:result
   select = expression>
   <-- Content: template -->
</func:result> 
         When an func:resultelement is instantiated, during the instantiation of a func:function element, the function returns with its value.  The value of thefunc:resultelement is determined in a similar way to variable-binding elements as described in [11.2 Values of Variables and Parameters] of [XSLT]. 
         It is an error for a func:resultelement to not be a descendant offunc:function.  It is an error for afunc:resultelement to have any following sibling elements aside from thexsl:fallbackelement. 
         It is an error if instantiating the content of the func:functionelement results in the instantion of more than onefunc:resultelements. 
         Thus the following is an error if the value of the context node when the function is called is equal to the string 'yes', as twofunc:resultelements are instantiated: one within thexsl:ifand one directly within thefunc:function: 
<func:function name="my:func1">
   <xsl:if test=". = 'yes'">
      <func:result select="true()" />
   </xsl:if>
   <func:result select="false()" />
</func:function>
         It is an error if a func:resultelement occurs within anfunc:resultelement.  Thus the following is an error: 
<func:function name="my:func2">
   <func:result>
      <func:result select="." />
   </func:result>
</func:function>
         It is an error if instantiating the content of a variable-binding element (i.e. xsl:variable,xsl:param) results in the instantiation of anfunc:resultelement. Thus the following is an error: 
<func:function name="my:func3">
   <xsl:variable name="foo">
      <func:result select="." />
   </xsl:variable>
</func:function>Return Values
         The func:resultelement can specify the value of the variable in three alternative ways. 
               If the func:resultelement has aselectattribute, then the value of the attribute must be an expression and the returned value is the object that results from evaluating the expression. In this case, the content must be empty.
               If the func:resultelement does not have aselectattribute and has non-empty content (i.e. thefunc:resultelement has one or more child nodes), then the content of thefunc:resultelement specifies the value.  The content of thefunc:resultelement is a template, which is instantiated to give the returned value. The value is a result tree fragment equivalent to a node-set containing just a single root node having as children the sequence of nodes produced by instantiating the template. The base URI of the nodes in the result tree fragment is the base URI of thefunc:resultelement. 
               It is an error if a member of the sequence of nodes created by instantiating the template is an attribute node or a namespace node, since a root node cannot have an attribute node or a namespace node as a child. An XSLT processor may signal the error; if it does not signal the error, it must recover by not adding the attribute node or namespace node.
            
               If the func:resultelement has empty content and does not have aselectattribute, then the returned value is an empty string. Thus <func:result /> 
               is equivalent to
             <func:result select="''"/>
Implementations
                  The following XSLT processors support func:result: There are currently no third-party implementations of func:result. |