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 Brenda Bell <b3...@theotherbell.com> on 2003/01/31 16:43:36 UTC

Need help getting XSL example to work

I'm trying to run the XSL JavaScript counter example at the bottom of 
http://xml.apache.org/xalan-j/extensions.html.

I have bsf.jar and js.jar on my classpath.  When I run the 
transformation usint the -TT and -TG options, I get the following output:

file:/d:/temp/test2.xslt Line #27, Column #-1: template match='/'
STARTDOCUMENT
STARTELEMENT: HTML
<HTML xmlns:xalan="http://xml.apache.org/xalan">
STARTELEMENT: H1
CHARACTERS: Names in alphatebical order
ENDELEMENT: H1
file:/d:/temp/test2.xslt; Line #30; Column #-1; TRaX Transform Throwable
<H1>Names in alphatebical order</H1>
STARTELEMENT: p
CHARACTERS: [
ENDELEMENT: p
<p>[</p>
ENDELEMENT: HTML

(Location of error unknown)XSLT Error 
(javax.xml.transform.TransformerException)
: TRaX Transform Throwable

What did I do wrong?

Brenda


RE: Need help getting XSL example to work

Posted by Gary L Peskin <ga...@firstech.com>.
Thanks.  Can you please open a report in bugzilla?

> -----Original Message-----
> From: Brenda Bell [mailto:b311b-list-xalanj-users@theotherbell.com] 
> Sent: Friday, January 31, 2003 8:58 AM
> To: xalan-j-users
> Subject: Re: Need help getting XSL example to work
> 
> 
> Brenda Bell wrote:
> > Brenda Bell wrote:
> > 
> >> I'm trying to run the XSL JavaScript counter example at 
> the bottom of
> >> http://xml.apache.org/xalan-j/extensions.html.
> >>
> > 
> > More information.  I did a fresh download and redid my class path to
> > include xalan.jar, xercesImpl.jar, xml-apis.jar, xsltc.jar, 
> bsf.jar and 
> > js.jar -- all in that order.
> > 
> > I'm now getting the following output:
> > 
> > (Location of error unknown)XSLT Error
> > (javax.xml.transform.TransformerException)
> > : java.lang.NoSuchMethodException: For extension function, 
> could not 
> > find method
> >  java.lang.String.read([ExpressionContext,] ).
> 
> Problem solved.  The namespace declaration in the example is shown as 
> xmlns:xalan="http://xml.apache.org/xalan".
> 
> If I change the namespace URI to 
> "http://xml.apache.org/xslt", it works. 
>   I think this is a 
> bug in the documentation.
> 


Re: Need help getting XSL example to work

Posted by Brenda Bell <b3...@theotherbell.com>.
Brenda Bell wrote:
> Brenda Bell wrote:
> 
>> I'm trying to run the XSL JavaScript counter example at the bottom of 
>> http://xml.apache.org/xalan-j/extensions.html.
>>
> 
> More information.  I did a fresh download and redid my class path to 
> include xalan.jar, xercesImpl.jar, xml-apis.jar, xsltc.jar, bsf.jar and 
> js.jar -- all in that order.
> 
> I'm now getting the following output:
> 
> (Location of error unknown)XSLT Error 
> (javax.xml.transform.TransformerException)
> : java.lang.NoSuchMethodException: For extension function, could not 
> find method
>  java.lang.String.read([ExpressionContext,] ).

Problem solved.  The namespace declaration in the example is shown as 
xmlns:xalan="http://xml.apache.org/xalan".

If I change the namespace URI to "http://xml.apache.org/xslt", it works. 
  I think this is a bug in the documentation.


Re: Need help getting XSL example to work

Posted by Brenda Bell <b3...@theotherbell.com>.
Gary L Peskin wrote:
> Be sure that MyCounter.java is in your CLASSPATH.

I'm trying to get the JavaScript example running... not the Java.  It's 
the example at the very bottom of 
http://xml.apache.org/xalan-j/extensions.html.  The counter functions 
are implemented in the script and MyCounter.java is not required, yes?



RE: Need help getting XSL example to work

Posted by Gary L Peskin <ga...@firstech.com>.
Sorry, I see that that is in xalansamples.jar.  Be sure that is in your
CLASSPATH.

> -----Original Message-----
> From: Gary L Peskin [mailto:garyp@firstech.com] 
> Sent: Friday, January 31, 2003 8:13 AM
> To: 'Brenda Bell'; 'xalan-j-users'
> Subject: RE: Need help getting XSL example to work
> 
> 
> Be sure that MyCounter.java is in your CLASSPATH.
> 
> > -----Original Message-----
> > From: Brenda Bell [mailto:b311b-list-xalanj-users@theotherbell.com]
> > Sent: Friday, January 31, 2003 8:02 AM
> > To: xalan-j-users
> > Subject: Re: Need help getting XSL example to work
> > 
> > 
> > Brenda Bell wrote:
> > > I'm trying to run the XSL JavaScript counter example at the
> > bottom of
> > > http://xml.apache.org/xalan-j/extensions.html.
> > > 
> > 
> > More information.  I did a fresh download and redid my class path to
> > include xalan.jar, xercesImpl.jar, xml-apis.jar, xsltc.jar, 
> > bsf.jar and 
> > js.jar -- all in that order.
> > 
> > I'm not getting the following output:
> > 
> file:///d:/temp/test2.xslt Line #27, Column #26: template 
> match='/' STARTDOCUMENT
> STARTELEMENT: HTML
> <HTML xmlns:xalan="http://xml.apache.org/xalan">
> STARTELEMENT: H1
> CHARACTERS: Names in alphatebical order
> ENDELEMENT: H1
> file:///d:/temp/test2.xslt; Line #30; Column #42; 
> javax.xml.transform.Transforme
> rException: java.lang.ClassNotFoundException: MyCounter 
> <H1>Names in alphatebical order</H1>
> STARTELEMENT: p
> CHARACTERS: [
> ENDELEMENT: p
> <p>[</p>
> ENDELEMENT: HTML
> 
> (Location of error unknown)XSLT Error 
> (javax.xml.transform.TransformerException)
> : java.lang.NoSuchMethodException: For extension function, could not 
> find method
>   java.lang.String.read([ExpressionContext,] ).
> 
> Same question:  what am I doing wrong?
> 
> 


RE: Need help getting XSL example to work

Posted by Gary L Peskin <ga...@firstech.com>.
Be sure that MyCounter.java is in your CLASSPATH.

> -----Original Message-----
> From: Brenda Bell [mailto:b311b-list-xalanj-users@theotherbell.com] 
> Sent: Friday, January 31, 2003 8:02 AM
> To: xalan-j-users
> Subject: Re: Need help getting XSL example to work
> 
> 
> Brenda Bell wrote:
> > I'm trying to run the XSL JavaScript counter example at the 
> bottom of
> > http://xml.apache.org/xalan-j/extensions.html.
> > 
> 
> More information.  I did a fresh download and redid my class path to 
> include xalan.jar, xercesImpl.jar, xml-apis.jar, xsltc.jar, 
> bsf.jar and 
> js.jar -- all in that order.
> 
> I'm not getting the following output:
> 
file:///d:/temp/test2.xslt Line #27, Column #26: template match='/'
STARTDOCUMENT
STARTELEMENT: HTML
<HTML xmlns:xalan="http://xml.apache.org/xalan">
STARTELEMENT: H1
CHARACTERS: Names in alphatebical order
ENDELEMENT: H1
file:///d:/temp/test2.xslt; Line #30; Column #42; 
javax.xml.transform.Transforme
rException: java.lang.ClassNotFoundException: MyCounter
<H1>Names in alphatebical order</H1>
STARTELEMENT: p
CHARACTERS: [
ENDELEMENT: p
<p>[</p>
ENDELEMENT: HTML

(Location of error unknown)XSLT Error 
(javax.xml.transform.TransformerException)
: java.lang.NoSuchMethodException: For extension function, could not 
find method
  java.lang.String.read([ExpressionContext,] ).

Same question:  what am I doing wrong?



Re: Need help getting XSL example to work

Posted by Brenda Bell <b3...@theotherbell.com>.
Brenda Bell wrote:
> I'm trying to run the XSL JavaScript counter example at the bottom of 
> http://xml.apache.org/xalan-j/extensions.html.
> 

More information.  I did a fresh download and redid my class path to 
include xalan.jar, xercesImpl.jar, xml-apis.jar, xsltc.jar, bsf.jar and 
js.jar -- all in that order.

I'm not getting the following output:

file:///d:/temp/test2.xslt Line #27, Column #26: template match='/'
STARTDOCUMENT
STARTELEMENT: HTML
<HTML xmlns:xalan="http://xml.apache.org/xalan">
STARTELEMENT: H1
CHARACTERS: Names in alphatebical order
ENDELEMENT: H1
file:///d:/temp/test2.xslt; Line #30; Column #42; 
javax.xml.transform.Transforme
rException: java.lang.ClassNotFoundException: MyCounter
<H1>Names in alphatebical order</H1>
STARTELEMENT: p
CHARACTERS: [
ENDELEMENT: p
<p>[</p>
ENDELEMENT: HTML

(Location of error unknown)XSLT Error 
(javax.xml.transform.TransformerException)
: java.lang.NoSuchMethodException: For extension function, could not 
find method
  java.lang.String.read([ExpressionContext,] ).

Same question:  what am I doing wrong?