Subject: Re: Issuing SQL statements similar to the Cocoon SQLProcessor? From: "Steve Muench" <smuench@xxxxxxxxxxxxx> Date: Thu, 11 May 2000 11:08:39 -0700 |
You an do this using the Oracle XSQL Pages technology, using the command-line 'xsql' utility as opposed to its companion XSQL Servlet. You can write a custom action handler to process the input document in any way necessary, or use the built-in functionality for doing this kind of database insert of XML. The XSQL page required to handle the job would look like: <xsql:insert-request table="yourtable" connection="yourconnectionname" xmlns:xsql="urn:oracle-xsql"/> if the document is already in canonical ROWSET/ROW form, or: <xsql:insert-request table="yourtable" transform="sometransform.xsl" connection="yourconnectionname" xmlns:xsql="urn:oracle-xsql"/> to first transform the data, then insert it. if you need a custom handler solution, the you can build an action handler that implements the single handleAction() method, and can call: getPageRequest().getPostedDocument() to get a handle to the XML being processed by the page as posted XML content. Your handler can then get access to the database connection that has been allocated from the pool to your page request with: getPageRequest().getJDBCConnection() and you can do your custom SQL. The XSQL command-line utility supports "posting" an XML document to your page explicity with the command line: $ xsql YourInsertPage.xsql posted-xml=yourfile.xml http://technet.oracle.com/tech/xml if you want to give it a spin. Full Doc, Help, and live demos online at: http://technet.oracle.com/tech/xml/demo/demo1.htm _________________________________________________________ Steve Muench, Consulting Product Manager & XML Evangelist Business Components for Java Development Team ----- Original Message ----- From: "Thorbjørn Ravn Andersen" <TRA@xxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent: Thursday, May 11, 2000 8:38 AM Subject: Issuing SQL statements similar to the Cocoon SQLProcessor? Hello. I have a large XML-file describing product data which I need to load into an Oracle 8i database. The current solution uses JDBC in a Swing program, but I would like to try doing this similar to what I have previously done with Cocoon, namely by using special SQL-tags which is executed by a SQL-processor, replacing the SQL-statement by a table representing the result in the XML-file. These SQL-tags would probably be generated by an XSL-layer. The amount of SQL-statements pr file is currently around 100000, with a similar amount of nodes. The execution time is currently of less importance, since I expect that this wil be negletible compared to the time spent by the database. I would very much prefer to do this from the command line in order to fully control the Java environment, as opposed to doing it inside Cocoon in a servlet engine (which would then be either Tomcat in Apache under NT or similar). If the Cocoon process could be simulated from the command line, that would be fine too. I would appreciate any kind of feedback :-) Ideas anyone? -- Thorbjørn Ravn Andersen "... plus ... Tubular Bells!" Stibo lokalnr 1212 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Issuing SQL statements similar to t, Thorbjørn Ravn Ander | Thread | fo:region-after, Dave Pawson |
Re: <xsl:number> count problem, David Marston/CAM/Lo | Date | Q: How to specify parameters in the, Ciot, Thierry |
Month |