You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Subrahmanya, Noida" <su...@noida.hcltech.com> on 2002/11/11 10:11:44 UTC

Transformer Creates Error in getContentAsSAX

Hi,
 I am using  xml datbase SocratesXML 1.3 which has support for XML:DB API.
 I am trying to integrate it with cocoon2.
I have cofigured following things
for cocoon.xconf
  <source-handler logger="core.source-handler">
    .
    .
    .
    <!-- xmldb pseudo protocol -->
    <protocol class="org.apache.cocoon.components.source.XMLDBSourceFactory"
name="xmldb">
      <!-- Add here other XML:DB compliant databases drivers -->
      <!-- SocratesXML XMLDB Driver -->
      <driver class="ordbxml.xmldb.DatabaseImpl" type="socratesxml"/>
    </protocol>
    .
    .
    .
</source-handler>
and  sitemap.xmap
    <!-- ======================= XML:DB ============================== -->
 <map:match pattern="demodb/**">
  <map:generate src="xmldb:socratesxml:///demodb/Mytown University/Student
applications/{1}"/>
 <!--  <map:transform src="maps-sheets/applicationxsl.xsl"/> --> <!--
Statement 1-->
  <map:serialize type="xml"/>
 </map:match>
I have database setup with XMLResource Chani at collection Mytown
University/Student applications/
Note Statement i is being commented. When request  for url
http://localhost:8080/cocoon/demodb/Chani
<http://localhost:8080/cocoon/demodb/Chani>  it completely displays
Chani XML on browser. But by being statement 1 uncommented it throws attched
exception. 
What could be the reason? I think in first case it looks for transformer .
If it is not there it calls getContent or else getContentAsSAX.
Is there any Idia. Is it possible to use cutomer code to generate XML enevts
for XML:DB pseudo protocol. If yes any idea to how go about it?
 
With Thanks and Regards,
 
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"
/>B. Subrahmanya Nayak
Member Technical Staff,
HCL Technologies Ltd.,

 <http://www.subrahmanya.50megs.com/>  

Disclaimer:

This document is intended for transmission to the named recipient only. If
you are not that person, you should note that legal rights reside in this
document and you are not authorized to access, read, disclose, copy, use or
otherwise deal with it and any such actions are prohibited and may be
unlawful. The views expressed in this document are not necessarily those of
HCL Technologies Ltd. Notice is hereby given that no representation,
contract or other binding obligation shall be created by this e-mail, which
must be interpreted accordingly. Any representations, contractual rights or
obligations shall be separately communicated in writing and signed in the
original by a duly authorized officer of the relevant company.


  _____  

 
<http://promos.hotbar.com/promos/promodll.dll?RunPromo&El=hotbar%5felement%3
bst%3b&SG=&RAND=1> Upgrade Your Email - Click here! 

Re: Transformer Creates Error in getContentAsSAX

Posted by Gianugo Rabellino <gi...@apache.org>.
Subrahmanya, Noida wrote:

 > I have database setup with XMLResource Chani at collection Mytown
 > University/Student applications/
 > Note Statement i is being commented. When request  for url
 > http://localhost:8080/cocoon/demodb/Chani it completely displays
 > Chani XML on browser. But by being statement 1 uncommented it throws
 > attched exception.
 > What could be the reason? I think in first case it looks for transformer
 > . If it is not there it calls getContent or else getContentAsSAX.
 > Is there any Idia. Is it possible to use cutomer code to generate XML
 > enevts for XML:DB pseudo protocol. If yes any idea to how go about it?

first of all please try to avoid HTML in your mail, as I (and I think 
many others out there) have troubles in following you with your current 
e-mail setup (hint: have a look at 
http://www.tuxedo.org/~esr/faqs/smart-questions.html).

Now for your problem: it's weird. IIUC (but please confirm) when you are 
using just a generator and a serializer everything works fine, but when 
you add a transformer you get that exception. This definitely shouldn't 
happen: from the generator POV a Serializer, just like a Transformer, 
acts as a ContentHandler, so there should be no difference at all in the 
way the XMLDB Source works. In both cases getContentAsSAX() is called, 
so there is no difference in the behaviour of the component. Do you have 
any sensible information in the Cocoon logs?

Let me know,

-- 
Gianugo Rabellino


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