You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lionel Barth <lb...@hachette-livre.fr> on 2001/06/26 18:21:37 UTC

esql:get-xml and external entities

Hello,

I use cocoon 1.8.2, tomcat 3.2.2, apache 1.3.20 and postgres 7.1.2

I have xml fragments in the database. I use esql taglib to extract
fragments:
  <esql:execute-query>
    <esql:query>select get_otsi('<request:get-parameter name="i"/>')
    </esql:query>
    <esql:results>
      <esql:row-results>
        <otsi>
          <esql:get-xml column="get_otsi"/>
        </otsi>
      </esql:row-results>
    </esql:results>
  </esql:execute-query>
</esql:connection>

All works fine until I have external entities references in a fragment
in which case I have a "org.xml.sax.SAXException: The entity "ouvert"
was referenced but not declared. [FATAL ERROR]" which is perfectly
right.

I tried to create a new "entities" attribute in esql:get-xml in esql.xsl
on the model of the "root" attribute in order to add a
<!DOCTYPE <xsl:value-of select="@root"/> [<!ENTITY % ent SYSTEM
'<xsl:value-of select="@entities"/>'> %ent;]>
before the xml fragment.

So the previous esql query was transformed to:
     <esql:row-results>
          <esql:get-xml root="otsi"
entities="http://mysite/myentitiesfile.ent" column="get_otsi"/>
      </esql:row-results>
 but it didn't work.

I tried to supply the declaration directly from the database, it didn't
work too.

Is there any way to tell esql:get-xml to handle external entities?

Thanks for any help
Lionel Barth



---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


help reg...sqltranformer

Posted by java guru <ja...@yahoo.co.in>.
Hi.,
  I am trying the sql tranformer example ...and
nothing ever show up..i actually see my query as it is
"select *...." on to the screen..

The connection pool is properly defined and the esql
example works but not the sql example...

Please help..
Thanks

____________________________________________________________
Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>