Hello Marty,

Hmm.. So ar you saying that if my clobs didn't have the "<?xml
version="1.0" encoding="UTF-8"?>"  then get-xml would work?

When I tried:
           <esql:get-xml column="doc_content"/>
It didn't work, but perhaps that is because it is a document.
Thursday, October 18, 2001, 7:13:50 AM, you wrote:

MM> I have a similar application - but the clob is an xml fragment ( meaning
MM> it doesn't have processing instruction tags ).  So I can use get-xml
MM> instead of the get-ascii you use.  Then I can access data in the xml
MM> fragment with the XSL stylesheet.

MM> marty

>> -----Original Message-----
>> From: Russell Castagnaro [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, October 18, 2001 12:48 PM
>> To: [EMAIL PROTECTED]
>> Subject: [C2] Accessing CLOBs as Documents
>> 
>> 
>> Hello cocoon-users,
>> 
>>   I've got a problem.
>> 
>>   I have a table that has a few fields and a clob in it.  I want to
>>   use the esql taglibs or SQLTransfromer to access this as a document.
>>   The column 'doc_content' is
>> 
>>   currently I'm using xml like this:
>> 
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> 
>> <xsp:page
>>           language="java"
>>           xmlns:xsp="http://apache.org/xsp";
>>           xmlns:esql="http://apache.org/cocoon/SQL/v2";
>> >
>> 
>>   <page>
>>    <title>A Database XML DOC Page</title>
>>    <content>
>> 
>> <esql:connection>
>>      <esql:pool>fun</esql:pool>
>>      <esql:execute-query>
>>        <esql:query>Select * from XML_DOC where doc_id in 
>> (select max(doc_id) from xml_doc) </esql:query>
>>        <esql:results> 
>>          <esql:row-results>
>>             <doc_id><esql:get-string column="doc_id"/></doc_id>
>> 
>>            <doc_content><esql:get-ascii 
>> column="doc_content"/></doc_content>
>>            <esql:get-columns/>
>>          </esql:row-results>
>>        </esql:results>
>>      </esql:execute-query>
>>    </esql:connection>
>> 
>>    </content>
>>   </page>
>> </xsp:page>
>> 
>> 
>> the 'doc_content' field'  is returned escaped out:
>> <doc_content>&lt;?xml version="1.0"?&gt;
>> &lt;Page name="Direct Donation"&gt;  
>> &lt;DefaultRoot&gt;/templates/seattletimes/&lt;/DefaultRoot&gt;  
>> &lt;Content-List&gt;  
>> &lt;Content type="include" 
>> handleError="false"&gt;header.jsp&lt;/Content&gt;  
>> &lt;MainContent type="include" 
>> handleError="true"&gt;donation2.jsp&lt;/MainContent&gt;  
>> &lt;Content type="include" 
>> handleError="false"&gt;footer.jsp&lt;/Content&gt;  
>> &lt;/Content-List&gt;  
>> &lt;Error&gt;error2.jsp&lt;/Error&gt;  
>> &lt;/Page&gt;</doc_content>
>> 
>> 
>> 
>> Is there any way to have this content integrated into the document?
>> 
>> 
>> Thanks,
>> rrc
>> 
>> -- 
>> Best regards,
>>  Russell                          mailto:[EMAIL PROTECTED]
>> 
>> 
>> ---------------------------------------------------------------------
>> Please check that your question has not already been answered in the
>> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>> 
>> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>> For additional commands, e-mail: <[EMAIL PROTECTED]>
>> 
>> 

MM> ---------------------------------------------------------------------
MM> Please check that your question has not already been answered in the
MM> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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




-- 
Best regards,
 Russell                            mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to