ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> exslt
exslt
Re: [exslt] Article: Debug XSLT on the fly
by other posts by this author
Jan 28 2003 2:56PM messages near this date
Re: [exslt] Article: Debug XSLT on the fly | RE: [exslt] Article: Debug XSLT on the fly
JDK 1.4 uses its own builtin Xalan (which is an older version) even if =
you
put xalan.jar on your CLASSPATH. Please read this FAQ
(http://xml.apache.org/xalan-j/faq.html#faq-N100C3) on how to use Xalan=

with JDK 1.4.

Morris Kwan
XSLT Development
IBM Toronto Lab
Tel: (905)413-3729
Email: mkwan@[...].com



                                                                       =
                                                                =20
                      "Paul H. Roubekas"                               =
                                                                =20
                      <paul@[...].org>            To:       <exslt@li=
sts.fourthought.com>                                             =20
                      Sent by:                      cc:                =
                                                                =20
                      exslt-admin@[...].four        Subject:  [exslt] A=
rticle: Debug XSLT on the fly                                   =20
                      thought.com                                      =
                                                                =20
                                                                       =
                                                                =20
                                                                       =
                                                                =20
                      01/27/2003 07:37 PM                              =
                                                                =20
                      Please respond to paul                           =
                                                                =20
                                                                       =
                                                                =20
                                                                       =
                                                                =20






Would anyone be willing to hazard a guess as to why I am getting the

followingerror while try to run the example from the article?=A0 I am o=
n

Win2K Pro, Xalanj 2.4.1, Xerces2.2.0.witha JSDK of 1.4.0.



file:///C:/PHR_XML/XSL/Debugging/global-vars.xslt; Line 33; Column 77; =
XSLT

Error javax.xml.transform.TransformerExcept

ion): java.lang.NoSuchMethodException: For extension function, could no=
t

findmethod java.lang.String.evaluate([Expressi

onContext,] ).



The bat file I created to try and run it follows.



=3Dstart bat file=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

echooff

ifnot exist C:\xalan-j_2_4_1\bin\xercesImpl.jar echo .jar file

(xercesImpl.jar) is missing or has been moved

SET CLASSPATH=3DC:\xalan-j_2_4_1\bin\xercesImpl.jar;%CLASSPATH%



ifnot exist C:\xalan-j_2_4_1\bin\xml-apis.jar echo .jar file

(xml-apis.jar) is missing or has been moved

SET CLASSPATH=3DC:\xalan-j_2_4_1\bin\xml-apis.jar;%CLASSPATH%



ifnot exist C:\xalan-j_2_4_1\bin\xalan.jar echo .jar file (xalan.jar) i=
s

missingor has been moved

SET CLASSPATH=3DC:\xalan-j_2_4_1\bin\xalan.jar;%CLASSPATH%



ifnot exist C:\xalan-j_2_4_1\bin\xalansamples.jar echo .jar file

(xalansamples.jar) is missing or has been moved

SET CLASSPATH=3DC:\xalan-j_2_4_1\bin\xalansamples.jar;%CLASSPATH%



ifnot exist C:\xalan-j_2_4_1\bin\xalanservlet.jar echo .jar file

(xalanservlet.jar) is missing or has been moved

SET CLASSPATH=3DC:\xalan-j_2_4_1\bin\xalanservlet.jar;%CLASSPATH%



ifnot exist C:\xalan-j_2_4_1\bin\bsf.jar echo .jar file (bsf.jar) is

missingor has been moved

SET CLASSPATH=3DC:\xalan-j_2_4_1\bin\bsf.jar;%CLASSPATH%



ifnot exist C:\Software\Rhino\JavaScript\rhino1_5R3\js.jar echo .jar fi=
le

(js.jar) is missing or has been moved

SET CLASSPATH=3DC:\Software\Rhino\JavaScript\rhino1_5R3\js.jar;%CLASSPA=
TH%



CD C:
CD C:\PHR_XML\XSL\Debugging

DOSKEY



javaorg.apache.xalan.xslt.Process-IN labels.xml-XSL global-vars.xslt

-OUT outWithDebuggingMessageText.xml

gotoEND2

:END

pause

:END2



=3D=3D=3D=3D=3D=3D=3Dlabels.xml=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

<?xmlversion=3D"1.0"?> 

<labels> 

=A0 <label> 

=A0=A0 <name> Thomas Eliot</name>

=A0=A0 <address> 

=A0=A0=A0 <street> 3 PrufrockLane</street>

=A0=A0=A0 <city> Hartford</city>

=A0=A0=A0 <state> CT</state>

=A0=A0 </address> 

=A0 </label> 

=A0 <label> 

=A0=A0 <name> Ezra Pound</name>

=A0=A0 <address> 

=A0=A0=A0 <street> 45 UsuraPlace</street>

=A0=A0=A0 <city> Hailey</city>

=A0=A0=A0 <state> ID</state>

=A0=A0 </address> 

=A0 </label> 

=A0 <label> 

=A0=A0 <name> William Williams</name>

=A0=A0 <address> 

=A0=A0=A0 <street> 100 Wheelbarrow Blvd</street>

=A0=A0=A0 <city> Patterson</city>

=A0=A0=A0 <state> NJ</state>

=A0=A0 </address> 

=A0 </label> 

</labels> 



=3D=3D=3D=3D=3D=3D=3Dlabels.xml=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

<?xmlversion=3D"1.0" encoding=3D"utf-8"?> 

<xsl:transformxmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform" versio=
n
=3D"1.0"> 



=A0=A0 <xsl:variablename=3D"spam" select=3D"'eggs'"/> 

=A0=A0 <xsl:variablename=3D"first-label" select=3D"/labels/label[1]"/> 

=A0=A0 <xsl:paramname=3D"monty" select=3D"'python'"/> 



=A0=A0 <xsl:templatematch=3D"labels"> 

=A0=A0=A0=A0 <xsl:call-template name=3D"get-addresses"/> 

=A0=A0 </xsl:template> 



=A0=A0 <xsl:templatename=3D"get-addresses"> 

=A0=A0=A0=A0 <xsl:variablename=3D"addresses" select=3D"label/address"/> =


=A0=A0=A0=A0 <xsl:message> 

=A0=A0=A0=A0=A0=A0 <xsl:call-template name=3D"dump-globals"/> 

=A0=A0=A0=A0 </xsl:message> 

=A0=A0 </xsl:template> 



=A0=A0 <!--Suppress all other element display --> 

=A0=A0 <xsl:templatematch=3D"*"/> 





=A0=A0 <!--Cut and paste this template into your own scripts --> 

=A0=A0 <xsl:templatename=3D"dump-globals" xmlns:exsl=3D"http://exslt.or=
g/common"

=A0=A0=A0=A0 xmlns:dyn=3D"http://exslt.org/dynamic"> 

=A0=A0=A0=A0 <!--Get the current transform document element --> 

=A0=A0=A0=A0 <!--A --> 

=A0=A0=A0=A0 <xsl:variablename=3D"ctde" select=3D"document('')/xsl:*"/> =


=A0=A0=A0=A0 <xsl:text> GLOBAL VARIABLES:&#10;</xsl:text>

=A0=A0=A0=A0 <!--B --> 

=A0=A0=A0=A0 <xsl:for-each select=3D"$ctde/xsl:variable|$ctde/xsl:param=
"> 

=A0=A0=A0=A0=A0=A0 <!--C --> 

=A0=A0=A0=A0=A0=A0 <xsl:variablename=3D"value" select=3D"dyn:evaluate(c=
oncat('$',
@name))"/> 

=A0=A0=A0=A0=A0=A0 <xsl:text> VARIABLE NAME:</xsl:text>

=A0=A0=A0=A0=A0=A0 <xsl:value-of select=3D"@name"/> <xsl:text>&#10;</xsl=
:text> 

=A0=A0=A0=A0=A0=A0 <xsl:text> VARIABLE VALUE:</xsl:text>

=A0=A0=A0=A0=A0=A0 <xsl:choose> 

=A0=A0=A0=A0=A0=A0=A0=A0 <!--D --> 

=A0=A0=A0=A0=A0=A0=A0=A0 <xsl:whentest=3D"exsl:object-type($value) =3D =
'node-set'"> 

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <xsl:copy-of select=3D"$value"/> 

=A0=A0=A0=A0=A0=A0=A0=A0 </xsl:when> 

=A0=A0=A0=A0=A0=A0=A0=A0 <xsl:otherwise> 

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <xsl:value-of select=3D"$value"/> 

=A0=A0=A0=A0=A0=A0=A0=A0 </xsl:otherwise> 

=A0=A0=A0=A0=A0=A0 </xsl:choose> 

=A0=A0=A0=A0=A0=A0 <xsl:text> &#10;</xsl:text>

=A0=A0=A0=A0 </xsl:for-each> 

=A0=A0=A0=A0 <xsl:text> END GLOBAL VARIABLES&#10;</xsl:text>

=A0=A0 </xsl:template> 



</xsl:transform> 





-----------------------------------------------------------------------=
-----------------------------------------------------------------------=
-----------------------------------------------------------------------=
-----------------------------------------------------------------------=
----------------------------------------

Note: This email is digitally signed, that is why you see the icon show=
ing
an attachment to this email.=A0 The attachment is my Digital Signature
(a.k.a. public key).




#### smime.p7s has been removed from this note on January 28 2003 by Mo=
rris
Kwan
=
Attachments:
=?iso-8859-1?Q?smime.p7s?=

Thread:

Paul H. Roubekas

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved