You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Evgeniy Strokin <ev...@yahoo.com> on 2002/08/06 23:31:04 UTC
XSLTC can't understand full Class name? (or what?):))
Hi, get a trable:
when I'm trying to compile XSL, which contains calling
of public static method I'm getting error:
class rt.adm.Address_list NOT compiled.
Cannot find class 'com'.
Cannot find external method
'softgage.tools.XSLTFunctions.checkPageNumber' (must
be static and public).
My XSL looks like:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xslt/java"
exclude-result-prefixes="java">
<xsl:template match="/root" name="Address">
<xsl:param name="sgns_skip">N</xsl:param>
<HTML>
........................................
<xsl:variable name="sgns_n_page"
select="java:com.softgage.tools.XSLTFunctions.checkPageNumber(string($sgns_n_page),
string(count(/root/Address)),string($sgns_step_page))"/>
........................................
When I'm doing regular transformation it works.
BUT, if I'm changing it to this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rT="com.softgage.tools.XSLTFunctions">
<xsl:template match="/root">
<HTML>
............................
<xsl:variable name="sgns_n_page"
select="rT:checkPageNumber(string($sgns_n_page),
string(count(/root/Week)),string($sgns_step_page))"/>
............................
I'm getting warning:
Warnings:file:/C:/xml/adm/person_log_book.xsl: Unable
to resolve call to function
'com.softgage.tools.XSLTFunctions:checkPageNumber'.
Pleeease, give me some advise how to solve this.
Thanks, Jenya
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
Re: XSLTC can't understand full Class name? (or what?):))
Posted by Evgeniy Strokin <ev...@yahoo.com>.
Thanks for respond, I've changed XSL as you say, but
result the same:
Warnings:file:/C:/xml/adm/person_log_book.xsl: Unable
to resolve call to function
'http://xml.apache.org/xslt/java/com.softgage.tools.XSLTFunctions:checkPageNumber'.
It'd be greatly appreciated if somebody provides
example of calling external function and successfully
compiled.
Thanks
Jenya
--- Santiago Pericas-Geertsen
<Sa...@sun.com> wrote:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns:java="http://xml.apache.org/xslt/java"
> >
> > BUT, if I'm changing it to this:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns:rT="com.softgage.tools.XSLTFunctions">
>
> The rT prefix must be defined as follows:
>
>
xmlns:rT="http://xml.apache.org/xslt/java/com.softgage.tools.XSLTFunctions"
>
> I.e., you need to prepend the URI that refers to
> external java functions.
>
> --
> Santiago Pericas-Geertsen
> Sun Microsystems
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
Re: XSLTC can't understand full Class name? (or what?):))
Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:java="http://xml.apache.org/xslt/java"
>
> BUT, if I'm changing it to this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:rT="com.softgage.tools.XSLTFunctions">
The rT prefix must be defined as follows:
xmlns:rT="http://xml.apache.org/xslt/java/com.softgage.tools.XSLTFunctions"
I.e., you need to prepend the URI that refers to external java functions.
--
Santiago Pericas-Geertsen
Sun Microsystems