You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Arthur Allen <ar...@hotmail.com> on 2003/06/24 02:16:04 UTC
clob import: best practice?
With some help from my friends I've been able to read largish XML clobs
into a session attributes using modular data base actions.
Unfortunately my hope of doing any actual xml processing on these suckers
using the session attribute generator (very cool) have failed miserably, as
SAX & xsl processors
(I tried them all) refuse to accept the text as valid xml.
Ditto using the sql transformer. Drats!
Gentlemen -- I do hate to be an ungrateful spoiler-- this strikes me as a
major shortcoming
in an environment that purports to support the development of xml based
apps.
If I were to write a custom action, is there any handy routine I could use
to
rewrite my "xml clob" session attributes into a type acceptable to SAX &the
xsl processors?
Do DBMS's adhere to some standard in this area? I'm using mysql.
Pray tell, what is the current best practice for processing xml clobs under
cocoon? Does
esql offer help?
Arthur
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: clob import: best practice?
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 24.Jun.2003 -- 12:16 AM, Arthur Allen wrote:
> With some help from my friends I've been able to read largish XML clobs
> into a session attributes using modular data base actions.
Great!
> Unfortunately my hope of doing any actual xml processing on these suckers
> using the session attribute generator (very cool) have failed miserably, as
> SAX & xsl processors
> (I tried them all) refuse to accept the text as valid xml.
You need to parse the text first or make sure that the object
implements xmlizable. Since there is no SQL type that is supposed to
be XML, this cannot be done automatically for you. If there were a
type for this, the JDBCTypeConversions class would be the place to
support it.
> If I were to write a custom action, is there any handy routine I could use
> to
> rewrite my "xml clob" session attributes into a type acceptable to SAX &the
> xsl processors?
Well, you need to parse it using a standard XML parser and return a
xmlizable object, DOM would be fine.
> Do DBMS's adhere to some standard in this area? I'm using mysql.
None that I'm aware of.
> Pray tell, what is the current best practice for processing xml clobs under
> cocoon? Does
> esql offer help?
esql offers a "get-xml" tag that does the parsing for you. Plain XSP
offer the util logicsheet, that has a include-expr tag for a similar
purpose.
Chris.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: clob import: best practice?
Posted by Morten Ludvigsen <mo...@yahoo.co.uk>.
>
> Ditto using the sql transformer. Drats!
>
I actually was looking at the same problem a couple of days ago. It turns out that the SQL
transformer has code that should detect XML automatically. However there has been an error that
meant that the XML parser never got instatiated, and that XML was therefore never detected. This
has been corrected in version 1.6 (2003/06/11 00:28:31) of SQLTransformer.java. I have not tested
this yet so I don't know if it works, but the code looks reasonable to me :-)
HTH.
Morten Ludvigsen
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org