Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: XDK - call xsql from xsl - Java extension functions
I have solved part of my problem put I still need your help for the
params:
The xsl looks like:
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ora="http://www.oracle.com/XSL/Transform/java" xmlns:xsql="http://www.oracle.com/XSL/Transform/java/oracle.xml.xsql.XSQLRequest" xmlns:url="http://www.oracle.com/XSL/Transform/java/java.net.URL" xmlns:has="http://www.oracle.com/XSL/Transform/java.util.Hashtable"> <xsl:template match="/">
<xsl:variable name="url"
select="url:new('file://G:/projects/test.xsql')"/>
<xsl:variable name="req" select="xsql:new($url)"/>
<xsl:variable name="res" select="xsql:process($req)"/>
<xsl:value-of select="$res"/>
</xsl:template>
I still need to translate the following java code into the xsl java extension:
Hashtable params = new Hashtable(3);
params.put("param1","value1");
The java code is:
import java.util.Hashtable; import java.io.PrintWriter; import java.net.URL;
// Construct the URL of the XSQL Page
URL pageUrl = new URL("file://G:/projects/bnpp/enet-pt/test.xsql");
// Construct a new XSQL Page request
XSQLRequest req = new XSQLRequest(pageUrl);
// Setup a Hashtable of named parameters to pass to the request
Hashtable params = new Hashtable(3);
params.put("param1","value1");
params.put("param2","value2");
/* If needed, treat an existing, in-memory XMLDocument as if
Nicolas_Clement_at_yahoo.fr (Nicolas) wrote in message news:<d37ac0e8.0304242339.335eb9b7_at_posting.google.com>...
> Hello, > I am trying to call xsql from xsl using the java extension functions > with no success. If you have a sample xsl code, it would be great. > Thank you for your help, > NCReceived on Fri Apr 25 2003 - 09:27:52 CDT