You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Rick Bullotta <ri...@lighthammer.com> on 2002/02/05 21:27:06 UTC
XALAN XSLT Extensions, BSF and VBScript
Has anyone ever been able to get this to work with VBScript? Not that
anyone would want to...<g> But, we're trying anyway. Works great with
Rhino 1.5 and javascript, but can't do a thing with vbscript...
Exception Stack Trace Is:
[Tue Feb 05 15:20:53 COT 2002] java.lang.reflect.InvocationTargetException:
java.lang.NullPointerException
[Tue Feb 05 15:20:53 COT 2002] at
com.ibm.bsf.engines.activescript.ActiveScriptEngine.call(ActiveScriptEngine.
java:793)
[Tue Feb 05 15:20:53 COT 2002] at java.lang.reflect.Method.invoke(Native
Method)
[Tue Feb 05 15:20:53 COT 2002] at
org.apache.xalan.extensions.ExtensionHandlerGeneral.callFunction(ExtensionHa
ndlerGeneral.java:361)
[Tue Feb 05 15:20:53 COT 2002] at
org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java
:257)
[Tue Feb 05 15:20:53 COT 2002] at
org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:181)
[Tue Feb 05 15:20:53 COT 2002] at
org.apache.xpath.Expression.executeCharsToContentHandler(Expression.java:301
)
[Tue Feb 05 15:20:53 COT 2002] at
org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:319)
Source XML:
<?xml version="1.0"?>
<doc>
<name first="David" last="Marston"/>
<name first="David" last="Bertoni"/>
<name first="Donald" last="Leslie"/>
<name first="Emily" last="Farmer"/>
<name first="Jack" last="Donohue"/>
<name first="Myriam" last="Midy"/>
<name first="Paul" last="Dick"/>
<name first="Robert" last="Weir"/>
<name first="Scott" last="Boag"/>
<name first="Shane" last="Curcuru"/>
</doc>
XSL:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:misc="LocalFunctions"
extension-element-prefixes="misc"
version="1.0">
<lxslt:component prefix="misc" functions="myFunc">
<lxslt:script lang="vbscript">
Function myFunc()
myFunc = "You Are "
End Function
</lxslt:script>
</lxslt:component>
<xsl:template match="/">
<HTML>
<H1>Names in alphabetical order</H1>
<xsl:for-each select="doc/name">
<xsl:sort select="@last"/>
<xsl:sort select="@first"/>
<p>
<xsl:text>[</xsl:text>
<xsl:value-of select="misc:myFunc()"/>
<xsl:text>]. </xsl:text>
<xsl:value-of select="@last"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="@first"/>
</p>
</xsl:for-each>
</HTML>
</xsl:template>
</xsl:stylesheet>
Rick Bullotta
CTO
Lighthammer Software (www.lighthammer.com)
Voice: 610-903-8000 x14
-----Original Message-----
From: Theodore W. Leung [mailto:twleung@sauria.com]
Sent: Tuesday, February 05, 2002 3:18 PM
To: shane_curcuru@lotus.com
Cc: xalan-dev@xml.apache.org; commons-dev@xml.apache.org
Subject: Re: [3rd party jar] xml-apis
.txt is fine by me. I thought I saw some files without the .txt, which
is why I left it off..
Ted
On Tue, 2002-02-05 at 06:58, Shane Curcuru wrote:
> Actually, I was hoping to post another quick beta build of xml-commons
> that included a license for exporting. Then I was planning on checking
> this license into xml-xalan's repository to match. That way projects
> that use xml-commons don't have to search for a license to use; they'll
> just checkin the same license whenever they grab a new xml-commons
> build.
>
> Later today I'll send a report on what the xalan and commons
> communities have done with the licensing issue.
>
> Note: I thought the suggested extension was .txt for the LICENSE files?
>
> - Shane
>
> ---- you "Theodore W. Leung" <tw...@sauria.com> wrote ----
> > xml-apis and xml-apis-1.0.jar are copies of the ASF xml-commons
> xml-api.jar.
> > xml-apis appears in xml-xalan/java/bin
> > xml-apis-1.0 appears in xml-xindice/java/lib
> > We can take care of this by checking in the ASF 1.1 License as
> xml-xalan/java/bin/xml-apis.LICENSE and
xml-xindice/java/lib/xml-apis-1.0.LICENSE
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
RE: XALAN XSLT Extensions, BSF and VBScript
Posted by Gary L Peskin <ga...@firstech.com>.
Rick --
I have it working. You need to build the latest version of BSF yourself
in Ant since it includes some bug fixes since their last release (v2.2).
I have the .jar file build and I can email it to you if you'd like.
It's only 76K.
Gary
> -----Original Message-----
> From: Rick Bullotta [mailto:rick.bullotta@lighthammer.com]
> Sent: Tuesday, February 05, 2002 1:02 PM
> To: xalan-dev@xml.apache.org
> Subject: RE: XALAN XSLT Extensions, BSF and VBScript
>
>
> I'll see if I can duplicate with another "native" scripting
> language to see if it is VBScript-specific or systemic to any
> of the native BSF layer calls.
>
> Rick Bullotta
> CTO
> Lighthammer Software (www.lighthammer.com)
> Voice: 610-903-8000 x14
>
>
>
> -----Original Message-----
> From: Gary L Peskin [mailto:garyp@firstech.com]
> Sent: Tuesday, February 05, 2002 4:00 PM
> To: xalan-dev@xml.apache.org; rick.bullotta@lighthammer.com
> Subject: RE: XALAN XSLT Extensions, BSF and VBScript
>
>
> Hi, Rick --
>
> I've run into this problem before and I've followed it
> somewhat down the path toward resolution. However, I never
> made it all the way. As I recall, things were blowing up in
> a native .dll and I didn't have a C++ compiler or debugger at
> the time.
>
> I'm looking through my notes and trying to get back to where
> I left off. I'm able to duplicate your NPE and I'm going to
> pursue things from there. I'll update the list shortly.
>
> Thanks,
> Gary
>
> > -----Original Message-----
> > From: Rick Bullotta [mailto:rick.bullotta@lighthammer.com]
> > Sent: Tuesday, February 05, 2002 12:27 PM
> > To: xalan-dev@xml.apache.org
> > Subject: XALAN XSLT Extensions, BSF and VBScript
> >
> >
> > Has anyone ever been able to get this to work with
> VBScript? Not that
> > anyone would want to...<g> But, we're trying anyway. Works great
> > with Rhino 1.5 and javascript, but can't do a thing with vbscript...
> >
> > Exception Stack Trace Is:
> >
> > [Tue Feb 05 15:20:53 COT 2002]
> > java.lang.reflect.InvocationTargetException:
> > java.lang.NullPointerException
> > [Tue Feb 05 15:20:53 COT 2002] at
> > com.ibm.bsf.engines.activescript.ActiveScriptEngine.call(Activ
> > eScriptEngine.
> > java:793)
> > [Tue Feb 05 15:20:53 COT 2002] at
> > java.lang.reflect.Method.invoke(Native
> > Method)
> > [Tue Feb 05 15:20:53 COT 2002] at
> > org.apache.xalan.extensions.ExtensionHandlerGeneral.callFuncti
> > on(ExtensionHa
> > ndlerGeneral.java:361)
> > [Tue Feb 05 15:20:53 COT 2002] at
> > org.apache.xalan.extensions.ExtensionsTable.extFunction(Extens
> > ionsTable.java
> > :257)
> > [Tue Feb 05 15:20:53 COT 2002] at
> > org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunc
> > tion.java:181)
> > [Tue Feb 05 15:20:53 COT 2002] at
> > org.apache.xpath.Expression.executeCharsToContentHandler(Expre
> > ssion.java:301
> > )
> > [Tue Feb 05 15:20:53 COT 2002] at
> > org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:319)
> >
> > Source XML:
> >
> > <?xml version="1.0"?>
> > <doc>
> > <name first="David" last="Marston"/>
> > <name first="David" last="Bertoni"/>
> > <name first="Donald" last="Leslie"/>
> > <name first="Emily" last="Farmer"/>
> > <name first="Jack" last="Donohue"/>
> > <name first="Myriam" last="Midy"/>
> > <name first="Paul" last="Dick"/>
> > <name first="Robert" last="Weir"/>
> > <name first="Scott" last="Boag"/>
> > <name first="Shane" last="Curcuru"/>
> > </doc>
> >
> > XSL:
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns:lxslt="http://xml.apache.org/xslt"
> > xmlns:misc="LocalFunctions"
> > extension-element-prefixes="misc"
> > version="1.0">
> >
> > <lxslt:component prefix="misc" functions="myFunc">
> > <lxslt:script lang="vbscript">
> > Function myFunc()
> > myFunc = "You Are "
> > End Function
> > </lxslt:script>
> > </lxslt:component>
> >
> > <xsl:template match="/">
> > <HTML>
> > <H1>Names in alphabetical order</H1>
> > <xsl:for-each select="doc/name">
> > <xsl:sort select="@last"/>
> > <xsl:sort select="@first"/>
> > <p>
> > <xsl:text>[</xsl:text>
> > <xsl:value-of select="misc:myFunc()"/>
> > <xsl:text>]. </xsl:text>
> > <xsl:value-of select="@last"/>
> > <xsl:text>, </xsl:text>
> > <xsl:value-of select="@first"/>
> > </p>
> > </xsl:for-each>
> > </HTML>
> > </xsl:template>
> >
> > </xsl:stylesheet>
> >
> > Rick Bullotta
> > CTO
> > Lighthammer Software (www.lighthammer.com)
> > Voice: 610-903-8000 x14
> >
> >
> >
> > -----Original Message-----
> > From: Theodore W. Leung [mailto:twleung@sauria.com]
> > Sent: Tuesday, February 05, 2002 3:18 PM
> > To: shane_curcuru@lotus.com
> > Cc: xalan-dev@xml.apache.org; commons-dev@xml.apache.org
> > Subject: Re: [3rd party jar] xml-apis
> >
> >
> > .txt is fine by me. I thought I saw some files without the .txt,
> > which is why I left it off..
> >
> > Ted
> >
> > On Tue, 2002-02-05 at 06:58, Shane Curcuru wrote:
> > > Actually, I was hoping to post another quick beta build of
> > xml-commons
> > > that included a license for exporting. Then I was planning on
> > > checking this license into xml-xalan's repository to match.
> > That way
> > > projects that use xml-commons don't have to search for a
> license to
> > > use; they'll just checkin the same license whenever they
> grab a new
> > > xml-commons build.
> > >
> > > Later today I'll send a report on what the xalan and commons
> > > communities have done with the licensing issue.
> > >
> > > Note: I thought the suggested extension was .txt for the LICENSE
> > > files?
> > >
> > > - Shane
> > >
> > > ---- you "Theodore W. Leung" <tw...@sauria.com> wrote ----
> > > > xml-apis and xml-apis-1.0.jar are copies of the ASF xml-commons
> > > xml-api.jar.
> > > > xml-apis appears in xml-xalan/java/bin
> > > > xml-apis-1.0 appears in xml-xindice/java/lib
> > > > We can take care of this by checking in the ASF 1.1 License as
> > > xml-xalan/java/bin/xml-apis.LICENSE and
> > xml-xindice/java/lib/xml-apis-1.0.LICENSE
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Send FREE Valentine eCards with Yahoo! Greetings!
> > > http://greetings.yahoo.com
> >
> >
> >
>
>
RE: XALAN XSLT Extensions, BSF and VBScript
Posted by Rick Bullotta <ri...@lighthammer.com>.
I'll see if I can duplicate with another "native" scripting language to see
if it is VBScript-specific or systemic to any of the native BSF layer calls.
Rick Bullotta
CTO
Lighthammer Software (www.lighthammer.com)
Voice: 610-903-8000 x14
-----Original Message-----
From: Gary L Peskin [mailto:garyp@firstech.com]
Sent: Tuesday, February 05, 2002 4:00 PM
To: xalan-dev@xml.apache.org; rick.bullotta@lighthammer.com
Subject: RE: XALAN XSLT Extensions, BSF and VBScript
Hi, Rick --
I've run into this problem before and I've followed it somewhat down the
path toward resolution. However, I never made it all the way. As I
recall, things were blowing up in a native .dll and I didn't have a C++
compiler or debugger at the time.
I'm looking through my notes and trying to get back to where I left off.
I'm able to duplicate your NPE and I'm going to pursue things from
there. I'll update the list shortly.
Thanks,
Gary
> -----Original Message-----
> From: Rick Bullotta [mailto:rick.bullotta@lighthammer.com]
> Sent: Tuesday, February 05, 2002 12:27 PM
> To: xalan-dev@xml.apache.org
> Subject: XALAN XSLT Extensions, BSF and VBScript
>
>
> Has anyone ever been able to get this to work with VBScript?
> Not that anyone would want to...<g> But, we're trying
> anyway. Works great with Rhino 1.5 and javascript, but can't
> do a thing with vbscript...
>
> Exception Stack Trace Is:
>
> [Tue Feb 05 15:20:53 COT 2002]
> java.lang.reflect.InvocationTargetException:
> java.lang.NullPointerException
> [Tue Feb 05 15:20:53 COT 2002] at
> com.ibm.bsf.engines.activescript.ActiveScriptEngine.call(Activ
> eScriptEngine.
> java:793)
> [Tue Feb 05 15:20:53 COT 2002] at
> java.lang.reflect.Method.invoke(Native
> Method)
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xalan.extensions.ExtensionHandlerGeneral.callFuncti
> on(ExtensionHa
> ndlerGeneral.java:361)
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xalan.extensions.ExtensionsTable.extFunction(Extens
> ionsTable.java
> :257)
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunc
> tion.java:181)
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xpath.Expression.executeCharsToContentHandler(Expre
> ssion.java:301
> )
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:319)
>
> Source XML:
>
> <?xml version="1.0"?>
> <doc>
> <name first="David" last="Marston"/>
> <name first="David" last="Bertoni"/>
> <name first="Donald" last="Leslie"/>
> <name first="Emily" last="Farmer"/>
> <name first="Jack" last="Donohue"/>
> <name first="Myriam" last="Midy"/>
> <name first="Paul" last="Dick"/>
> <name first="Robert" last="Weir"/>
> <name first="Scott" last="Boag"/>
> <name first="Shane" last="Curcuru"/>
> </doc>
>
> XSL:
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:lxslt="http://xml.apache.org/xslt"
> xmlns:misc="LocalFunctions"
> extension-element-prefixes="misc"
> version="1.0">
>
> <lxslt:component prefix="misc" functions="myFunc">
> <lxslt:script lang="vbscript">
> Function myFunc()
> myFunc = "You Are "
> End Function
> </lxslt:script>
> </lxslt:component>
>
> <xsl:template match="/">
> <HTML>
> <H1>Names in alphabetical order</H1>
> <xsl:for-each select="doc/name">
> <xsl:sort select="@last"/>
> <xsl:sort select="@first"/>
> <p>
> <xsl:text>[</xsl:text>
> <xsl:value-of select="misc:myFunc()"/>
> <xsl:text>]. </xsl:text>
> <xsl:value-of select="@last"/>
> <xsl:text>, </xsl:text>
> <xsl:value-of select="@first"/>
> </p>
> </xsl:for-each>
> </HTML>
> </xsl:template>
>
> </xsl:stylesheet>
>
> Rick Bullotta
> CTO
> Lighthammer Software (www.lighthammer.com)
> Voice: 610-903-8000 x14
>
>
>
> -----Original Message-----
> From: Theodore W. Leung [mailto:twleung@sauria.com]
> Sent: Tuesday, February 05, 2002 3:18 PM
> To: shane_curcuru@lotus.com
> Cc: xalan-dev@xml.apache.org; commons-dev@xml.apache.org
> Subject: Re: [3rd party jar] xml-apis
>
>
> .txt is fine by me. I thought I saw some files without the
> .txt, which is why I left it off..
>
> Ted
>
> On Tue, 2002-02-05 at 06:58, Shane Curcuru wrote:
> > Actually, I was hoping to post another quick beta build of
> xml-commons
> > that included a license for exporting. Then I was planning on
> > checking this license into xml-xalan's repository to match.
> That way
> > projects that use xml-commons don't have to search for a license to
> > use; they'll just checkin the same license whenever they grab a new
> > xml-commons build.
> >
> > Later today I'll send a report on what the xalan and commons
> > communities have done with the licensing issue.
> >
> > Note: I thought the suggested extension was .txt for the LICENSE
> > files?
> >
> > - Shane
> >
> > ---- you "Theodore W. Leung" <tw...@sauria.com> wrote ----
> > > xml-apis and xml-apis-1.0.jar are copies of the ASF xml-commons
> > xml-api.jar.
> > > xml-apis appears in xml-xalan/java/bin
> > > xml-apis-1.0 appears in xml-xindice/java/lib
> > > We can take care of this by checking in the ASF 1.1 License as
> > xml-xalan/java/bin/xml-apis.LICENSE and
> xml-xindice/java/lib/xml-apis-1.0.LICENSE
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
>
>
>
RE: XALAN XSLT Extensions, BSF and VBScript
Posted by Gary L Peskin <ga...@firstech.com>.
Hi, Rick --
I've run into this problem before and I've followed it somewhat down the
path toward resolution. However, I never made it all the way. As I
recall, things were blowing up in a native .dll and I didn't have a C++
compiler or debugger at the time.
I'm looking through my notes and trying to get back to where I left off.
I'm able to duplicate your NPE and I'm going to pursue things from
there. I'll update the list shortly.
Thanks,
Gary
> -----Original Message-----
> From: Rick Bullotta [mailto:rick.bullotta@lighthammer.com]
> Sent: Tuesday, February 05, 2002 12:27 PM
> To: xalan-dev@xml.apache.org
> Subject: XALAN XSLT Extensions, BSF and VBScript
>
>
> Has anyone ever been able to get this to work with VBScript?
> Not that anyone would want to...<g> But, we're trying
> anyway. Works great with Rhino 1.5 and javascript, but can't
> do a thing with vbscript...
>
> Exception Stack Trace Is:
>
> [Tue Feb 05 15:20:53 COT 2002]
> java.lang.reflect.InvocationTargetException:
> java.lang.NullPointerException
> [Tue Feb 05 15:20:53 COT 2002] at
> com.ibm.bsf.engines.activescript.ActiveScriptEngine.call(Activ
> eScriptEngine.
> java:793)
> [Tue Feb 05 15:20:53 COT 2002] at
> java.lang.reflect.Method.invoke(Native
> Method)
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xalan.extensions.ExtensionHandlerGeneral.callFuncti
> on(ExtensionHa
> ndlerGeneral.java:361)
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xalan.extensions.ExtensionsTable.extFunction(Extens
> ionsTable.java
> :257)
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunc
> tion.java:181)
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xpath.Expression.executeCharsToContentHandler(Expre
> ssion.java:301
> )
> [Tue Feb 05 15:20:53 COT 2002] at
> org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:319)
>
> Source XML:
>
> <?xml version="1.0"?>
> <doc>
> <name first="David" last="Marston"/>
> <name first="David" last="Bertoni"/>
> <name first="Donald" last="Leslie"/>
> <name first="Emily" last="Farmer"/>
> <name first="Jack" last="Donohue"/>
> <name first="Myriam" last="Midy"/>
> <name first="Paul" last="Dick"/>
> <name first="Robert" last="Weir"/>
> <name first="Scott" last="Boag"/>
> <name first="Shane" last="Curcuru"/>
> </doc>
>
> XSL:
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:lxslt="http://xml.apache.org/xslt"
> xmlns:misc="LocalFunctions"
> extension-element-prefixes="misc"
> version="1.0">
>
> <lxslt:component prefix="misc" functions="myFunc">
> <lxslt:script lang="vbscript">
> Function myFunc()
> myFunc = "You Are "
> End Function
> </lxslt:script>
> </lxslt:component>
>
> <xsl:template match="/">
> <HTML>
> <H1>Names in alphabetical order</H1>
> <xsl:for-each select="doc/name">
> <xsl:sort select="@last"/>
> <xsl:sort select="@first"/>
> <p>
> <xsl:text>[</xsl:text>
> <xsl:value-of select="misc:myFunc()"/>
> <xsl:text>]. </xsl:text>
> <xsl:value-of select="@last"/>
> <xsl:text>, </xsl:text>
> <xsl:value-of select="@first"/>
> </p>
> </xsl:for-each>
> </HTML>
> </xsl:template>
>
> </xsl:stylesheet>
>
> Rick Bullotta
> CTO
> Lighthammer Software (www.lighthammer.com)
> Voice: 610-903-8000 x14
>
>
>
> -----Original Message-----
> From: Theodore W. Leung [mailto:twleung@sauria.com]
> Sent: Tuesday, February 05, 2002 3:18 PM
> To: shane_curcuru@lotus.com
> Cc: xalan-dev@xml.apache.org; commons-dev@xml.apache.org
> Subject: Re: [3rd party jar] xml-apis
>
>
> .txt is fine by me. I thought I saw some files without the
> .txt, which is why I left it off..
>
> Ted
>
> On Tue, 2002-02-05 at 06:58, Shane Curcuru wrote:
> > Actually, I was hoping to post another quick beta build of
> xml-commons
> > that included a license for exporting. Then I was planning on
> > checking this license into xml-xalan's repository to match.
> That way
> > projects that use xml-commons don't have to search for a license to
> > use; they'll just checkin the same license whenever they grab a new
> > xml-commons build.
> >
> > Later today I'll send a report on what the xalan and commons
> > communities have done with the licensing issue.
> >
> > Note: I thought the suggested extension was .txt for the LICENSE
> > files?
> >
> > - Shane
> >
> > ---- you "Theodore W. Leung" <tw...@sauria.com> wrote ----
> > > xml-apis and xml-apis-1.0.jar are copies of the ASF xml-commons
> > xml-api.jar.
> > > xml-apis appears in xml-xalan/java/bin
> > > xml-apis-1.0 appears in xml-xindice/java/lib
> > > We can take care of this by checking in the ASF 1.1 License as
> > xml-xalan/java/bin/xml-apis.LICENSE and
> xml-xindice/java/lib/xml-apis-1.0.LICENSE
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
>
>
>