xsl-list
[Top] [All Lists]

Re: [xsl] xsl:function problem

2007-05-13 11:47:22
"Ilya" == Ilya Sterin <sterini(_at_)gmail(_dot_)com> writes:

    Ilya> I'm using a very simple function and transforming through
    Ilya> oxygen configured to use Saxon8B.

    Ilya> The function seems to be ok when no parameters are required,
    Ilya> but seems to ignore xsl:param when added?

    Ilya> Here is an example...

    Ilya> <xsl:function name="p2f:lookupNameFor"> <xsl:param
    Ilya> name="formOID" as="xs:string"/> <xsl:value-of
    Ilya> select="tokenize(//ItemGroupDef[OID=$formOID]/@Name,
    Ilya> '::')"/> </xsl:function>


    Ilya> Then when the function is called without any params the xslt
    Ilya> validates fine...

    Ilya> <xsl:variable name="identifiers"><xsl:value-of
    Ilya> select="p2f:lookupNameFor('test')"/></xsl:variable>

    Ilya> and the following throws an error...

    Ilya> <xsl:variable name="identifiers"><xsl:value-of
    Ilya> select="p2f:lookupNameFor('test')"/></xsl:variable>

    Ilya> F [Saxon8B] XPath syntax error at char 30 on line 23 in
    Ilya> {p2f:lookupPrismNameFor('test')}: Cannot find a matching
    Ilya> 1-argument function named
    Ilya> {http://www.nextrials.com/ns/prism2flex/v1.0}lookupNameFor()

    Ilya> The p2f namespace prefix is declared correctly.


    Ilya> Am I doing something wrong?

You appear to be cut-and-pasting wrong, as I cannot see any difference
between your two examples.
-- 
Colin Adams
Preston Lancashire

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>