Re: clob import: best practice?

2003-06-24 Thread Christian Haul
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
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: clob import: best practice?

2003-06-24 Thread Arthur Allen
I tried the latest sqltransformer  it did the right thing !!!

Now if only someone could fix the session generator in the same way ;), as 
it seems quite happy to
drop xml as cdata into the xml event stream.

Thanks!
Arthur Allen
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 
:-)
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]