You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Sven Thomke <sv...@student.liu.se> on 2012/10/15 13:51:16 UTC

The function local-name was not found

Hello, I'm writing a server application which parses XML and im using
XalanC 1.10 to transform the incoming XML to a desired format. What is
currently bugging me is that it seems like the function "local-name" does
not seem to be implemented. After a failed transformation i check the
latest error with "transformer.getLastError()" and this is the error i get:

*XPathParserException: The function '{local-name' was not found.*
*expression = '{local-name()}' Remaining tokens are:  ('{local-name' '('
')' '}') ([PATH TO XSL-FILE], line 30, column 45)*

Is it simply so that i can't use local-name with XalanC or am i doing
something wrong?!?!?!?

Glad for any sort of answer :)
//Sven

Re: The function local-name was not found

Posted by sh...@e-z.net.
> On 10/15/2012 4:51 AM, Sven Thomke wrote:
>> Hello, I'm writing a server application which parses XML and im using
>> XalanC 1.10 to transform the incoming XML to a desired format. What is
>> currently bugging me is that it seems like the function "local-name"
>> does not seem to be implemented. After a failed transformation i check
>> the latest error with "transformer.getLastError()" and this is the
>> error i get:
>>
>> /XPathParserException: The function '{local-name' was not found./
>> /expression = '{local-name()}' Remaining tokens are:  ('{local-name'
>> '(' ')' '}') ([PATH TO XSL-FILE], line 30, column 45)/
>>
>> Is it simply so that i can't use local-name with XalanC or am i doing
>> something wrong?!?!?!?
>>
>> Glad for any sort of answer :)
>> //Sven
>
> Sven,
>
> Since I don't know your code, my comments may not solve your problem.
>
> The XPath Function "local-name" function is declared as a member of class
> XPathProcessorImpl using header file XPathProcessorImpl.hpp and defined
> in the companion XPathProcessorImpl.cpp.
>
> Have you initialized your XPath processor?
>
> If you are using the XalanTransformer, then its initializer should
> automatically initialize the XPath interpreter.
>
> Our current website is: http://xalan.apache.org/xalan-c
>
> Sincerely,
> Steven J. Hathaway
> Xalan Documentation Project
>
>

I also see that "XPath/XPathFunctinTable.cpp" has function "local-name"
set to an undefined function stub.  This may be part of your problem.

But if you implementation uses "XPath/ProcessorImpl" then the "local-name"
is defined and should be usable.

Sincerely,
Steven J. Hathaway



Re: The function local-name was not found

Posted by "Steven J. Hathaway" <sh...@e-z.net>.
On 10/15/2012 4:51 AM, Sven Thomke wrote:
> Hello, I'm writing a server application which parses XML and im using 
> XalanC 1.10 to transform the incoming XML to a desired format. What is 
> currently bugging me is that it seems like the function "local-name" 
> does not seem to be implemented. After a failed transformation i check 
> the latest error with "transformer.getLastError()" and this is the 
> error i get:
>
> /XPathParserException: The function '{local-name' was not found./
> /expression = '{local-name()}' Remaining tokens are:  ('{local-name' 
> '(' ')' '}') ([PATH TO XSL-FILE], line 30, column 45)/
>
> Is it simply so that i can't use local-name with XalanC or am i doing 
> something wrong?!?!?!?
>
> Glad for any sort of answer :)
> //Sven

Sven,

Since I don't know your code, my comments may not solve your problem.

The XPath Function "local-name" function is declared as a member of class
XPathProcessorImpl using header file XPathProcessorImpl.hpp and defined
in the companion XPathProcessorImpl.cpp.

Have you initialized your XPath processor?

If you are using the XalanTransformer, then its initializer should
automatically initialize the XPath interpreter.

Our current website is: http://xalan.apache.org/xalan-c

Sincerely,
Steven J. Hathaway
Xalan Documentation Project




Re: The function local-name was not found

Posted by Sven Thomke <sv...@student.liu.se>.
Thank you, it was indeed a problem with where and how i initialized my
transformer.

//Sven