AnFrusch@pepp Posted October 3, 2005 Posted October 3, 2005 (edited) Hello all, I'm busy trying to extend XSLT/CWPE functions using javascript (as a server side scripting language). <?xml version="1.0" encoding="ISO-8859-1"?> <?xslt-cwp-query param="-grammar=fmresultset"?> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fmrs="http://www.filemaker.com/xml/fmresultset" xmlns:fmxslt="xalan://com.fmi.xslt.ExtensionFunctions" xmlns:fmc="http://www.filemaker.com/xml/cookie" xmlns:xalan="http://xml.apache.org/xslt" xmlns:fmp-ex="ext1" exclude-result-prefixes="xsl fmrs fmxslt fmp-ex"> and this is my js function declared and defined int function helloWorld(s) { /* * semplice funzione per testare JS 'lato server' */ return s; } < /xalan:script > but when I call this function in xsl:value-of element (select="fmp-ex:hello World('hello world!!!'") the engine returns this error: [color:red]java.lang.NullPointerException.. can anyone help me? Edited October 3, 2005 by Guest
AnFrusch@pepp Posted October 4, 2005 Author Posted October 4, 2005 (edited) Hello! Yes, I only restart the Web Publishing Engine.. I will now try to restart the machine.. but I don't think the problem will be solved. I'm asking if this can be due to a wrong permission settings (Mac OS X 10.3.5) these are the permission in /Library/FileMaker Server/WebPublishing/publishing-engine/cwpe/WEB-INF/lib -r--r--r-- 1 fmweb fmsadmin 376924 Aug 30 2004 HTTPClient.jar -rwxr--r-- 1 fmweb fmsadmin 105573 Sep 25 10:18 bsf.jar -r--r--r-- 1 fmweb fmsadmin 446560 Jan 24 2005 cwpe.jar -r--r--r-- 1 fmweb fmsadmin 247202 Aug 30 2004 inetfactory.jar -r--r--r-- 1 fmweb fmsadmin 79297 Aug 30 2004 jakarta-oro-2.0.5.jar -rwxr--r-- 1 fmweb fmsadmin 483294 Sep 25 10:18 js.jar -r--r--r-- 1 fmweb fmsadmin 350677 Aug 30 2004 log4j-1.2.7.jar could you please confirm that the permissions are right? Edited October 4, 2005 by Guest
AnFrusch@pepp Posted October 4, 2005 Author Posted October 4, 2005 Wow.. I restarted once again the engine and now it works. Thank you Martin. Next step is add the MD5 hash to my web site! but I think it will be not so hard.. ;)
Martin Brändle Posted October 4, 2005 Posted October 4, 2005 ;) I see: http://fmforums.com/forum/showtopic.php?tid/161661 (do you remember my request?)
AnFrusch@pepp Posted October 5, 2005 Author Posted October 5, 2005 (edited) Hello martin.. yes, I remember and I'm working on that project since few days (formerly I used PHP to encrypt strings on the web). I have some problem with md5.js once I use it as extension on my xslt stylesheet.. unfortunately cwpe still gave me a nullpointer exeption.. don't know what can cause it because client side that script works really good! have you ever tried to use that function? it seems there are no other javascipt on the www to do that. When I will solve this problem I will post my solution on this site (I hope I will get it faster with your help!) PS: could you please explain better how to use xalan:component tag and xalan:script tag? I'm trying to understand the proper way to write them but I cannot find exhaustive documentation (especially in italian it's very hard! ), I don't know ho to write attributes and values (maybe my problem is there..), I don't know if in xalan:component functions attributes I must write all the functions defined inside xalan:script or just the one I really need.. and so on.. thank you for patience! Bye.. Edited October 5, 2005 by Guest
Recommended Posts
This topic is 6988 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now