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:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 3:18 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
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" <[EMAIL PROTECTED]> 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



Reply via email to