[plexippus-xpath-devel] function-available doesn't find an extension function

Andrei Stebakov lispercat at gmail.com
Fri Jan 7 21:25:01 UTC 2011


(xpath::define-extension func "http://www.test.com/func")
(xpath::define-xpath-function/eager func test-func (arg1 arg2)
  (concatenate 'string arg1 " " arg2))

(xuriella:apply-stylesheet
  "<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
                  xmlns:func='http://www.test.com/func'
                  version='1.0'>
     <xsl:template match='/'>
     <xsl:choose>
       <xsl:when test='function-available(\"func:test-func\")'>
         <xsl:text>test succeeded:</xsl:text>
         <xsl:value-of select='func:test-func(\"one\", \"two\")' />
       </xsl:when>
       <xsl:otherwise>
         <xsl:text>test failed:</xsl:text>
         <xsl:value-of select='func:test-func(\"one\", \"two\")' />
       </xsl:otherwise>
     </xsl:choose>
     </xsl:template>
   </xsl:stylesheet>"
  "<test-input/>")


On Fri, Jan 7, 2011 at 1:52 PM, David Lichteblau <david at lichteblau.com> wrote:
> Quoting Andrei Stebakov (lispercat at gmail.com):
>> Later in xls when I test <xsl:if
>> test="function-available('func:test-func')"> the test fails.
>> The function itself works well in xls. Is it expected behavior?
>
> Well, if a function works but isn't advertised by function-available,
> that sounds like a bug.  Do you have a self-contained test caes?
>
> Thanks
> d.
>




More information about the plexippus-xpath-devel mailing list