Subject: RE: [xsl] Xalan-Java extensions From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Wed, 21 Mar 2001 17:45:57 -0000 |
Gunal, With a couple of mods I can get it working with msxsl <?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="urn:zgunal@xxxxxxxxxxx" extension-element-prefixes="msxsl" exclude-result-prefixes="mynamespace"> <msxsl:script language="JScript" implements-prefix="mynamespace"> function appendtolog(){ var fso, tf, a, ForAppending; ForAppending = 8; logString = "Testing.."; logFileName = "c:\\temp\\testfile.txt"; //escape \ fso = new ActiveXObject("Scripting.FileSystemObject"); if (fso.FileExists(logFileName)) tf = fso.OpenTextFile(logFileName, ForAppending, false);//typo else tf = fso.CreateTextFile(logFileName, true); // Write the input string with a newline character. tf.WriteLine(logString) ; tf.Close(); return ''; //return } </msxsl:script> <xsl:template name="append-to-log"> <xsl:param name="log-string" select="." /> <xsl:value-of select="mynamespace:appendtolog()" /> </xsl:template> </xsl:stylesheet> I can't get it to work with xalan. All I get is ========= Parsing file:C:/TEMP/main.xsl ========== Parse of file:C:/TEMP/main.xsl took 1532 milliseconds ========= Parsing main.XML ========== Parse of main.XML took 109 milliseconds ============================= Transforming... Call to extension function failed: urn:zgunal@hotmail/com Call to extension function failed: urn:zgunal@hotmail/com Call to extension function failed: urn:zgunal@hotmail/com transform took 359 milliseconds XSLProcessor: done But at least it shows that it works in theory. 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 -> |
---|---|---|
[xsl] Xalan-Java extensions, Zeynep Gunal | Thread | RE: [xsl] Xalan-Java extensions, Chris Bayes |
[xsl] How to display XML data parti, Davut Karabay | Date | Re: [xsl] How to display XML data p, Jeni Tennison |
Month |