Subject: RE: [xsl] Xalan-Java extensions From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Wed, 21 Mar 2001 20:10:41 -0000 |
This is a step closer <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:mynamespace="extl" xmlns:lxslt="http://xml.apache.org/xslt" extension-element-prefixes="mynamespace" exclude-result-prefixes="mynamespace"> <lxslt:component prefix="mynamespace" elements="appendtolog" functions="appendtolog"> <lxslt:script lang="javascript"> function appendtolog(){ var fso, tf, a, ForAppending; ForAppending = 8; logString = "Testing.."; logFileName = "c:\\testlog.txt"; fso = new ActiveXObject("Scripting.FileSystemObject"); if (fso.FileExists(logFileName)) tf = fso.OpenTextFile(logFileName, ForAppending, false); else tf = fso.CreateTextFile(logFileName, true); // Write the input string with a newline character. tf.WriteLine(logString) ; tf.Close(); } </lxslt:script> </lxslt:component> <xsl:template name="append-to-log"> <xsl:param name="log-string" select="." /> ====++ <xsl:value-of select="mynamespace:appendtolog()" /> </xsl:template> </xsl:stylesheet> But I get ========= Parsing file:C:/TEMP/main.xsl ========== Parse of file:C:/TEMP/main.xsl took 1484 milliseconds ========= Parsing main.XML ========== Parse of main.XML took 110 milliseconds ============================= Transforming... Call to extension function failed: unable to load language: javascript Call to extension function failed: unable to load language: javascript Call to extension function failed: unable to load language: javascript ====++ ====++ ====++ transform took 375 milliseconds XSLProcessor: done Maybe it will work for you. Ciao Chris XML/XSL Portal http://www.bayes.co.uk/xml XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Xalan-Java extensions, Chris Bayes | Thread | RE: [xsl] Xalan-Java extensions, Michael Kay |
Re: [xsl] [XSLT] [Q] Recursion Ques, Francis Norton | Date | Re: Template repository (Was: Re: [, Steve Ball |
Month |