You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andreas Busch <An...@ilogics.de> on 2005/09/02 15:40:23 UTC

Store XML-posts in Oracle databse

I have to store posted XML-Documents  into a Oracle Database for Archiving, but i have no idea how to do this.
I think SQLTransformer can not handle Blob/Clob as a stream!
Something like this :
	<xsl:template match="/">
  		<sql:execute-query>
    		<sql:query>
    		insert into incoming(id,docnummer,xmldata)
    		values(inc_seq.nextval(),1,xmlelement('<xsl:copy-of select="/" />'))
     		</sql:query>
   		</sql:execute-query>
	</xsl:template> 

Can handle up to 4000 bytes only.

After storing I have to process the xml and store it in relational tablestruktur so sqlTransformer/XSQL looks good for this job.
Or must I write a custom Streamgenerator ??



Thanks a million


Andreas Busch
ILOGICS GmbH ∙ Berduxstr. 22 ∙ D-81245 München
Andreas.Busch@ilogics.de
Tel: +49 89 896667-0
Fax: +49 89 896667-29
www.ilogics.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Store XML-posts in Oracle databse

Posted by Jeff Turner <je...@apache.org>.
On Fri, Sep 02, 2005 at 03:40:23PM +0200, Andreas Busch wrote:
> I have to store posted XML-Documents  into a Oracle Database for Archiving, but i have no idea how to do this.
> I think SQLTransformer can not handle Blob/Clob as a stream!
> Something like this :
> 	<xsl:template match="/">
>   		<sql:execute-query>
>     		<sql:query>
>     		insert into incoming(id,docnummer,xmldata)
>     		values(inc_seq.nextval(),1,xmlelement('<xsl:copy-of select="/" />'))
>      		</sql:query>
>    		</sql:execute-query>
> 	</xsl:template> 
> 
> Can handle up to 4000 bytes only.
> 
> After storing I have to process the xml and store it in relational tablestruktur so sqlTransformer/XSQL looks good for this job.
> Or must I write a custom Streamgenerator ??

In the Oracle 10g driver (backwards-compatible with 9) there is a
setBigStringTryClob parameter which gets around this limitation. See:

http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/clob10g/handlingclobsinoraclejdbc10g.html
http://confluence.atlassian.com/display/JIRA/Using+Oracle+10g+drivers+to+solve+the+4000+character+limitation


--Jeff


> Thanks a million
> 
> 
> Andreas Busch
> ILOGICS GmbH ∙ Berduxstr. 22 ∙ D-81245 München
> Andreas.Busch@ilogics.de
> Tel: +49 89 896667-0
> Fax: +49 89 896667-29
> www.ilogics.de
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org