I just ran that RetrieveDocument class and it worked fine for me as
well. So perhaps Cocoon is getting the xml, but something else is
happening after. What's curious is that my brower says its getting xml
back, however what I get back is: "<html><body/></html>".

Why would I get back blank html instead of blank xml?

Here is my sitemap.xmap, does it look ok?

<?xml version="1.0" encoding="UTF-8"?>

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>

<!-- =========================== Views
=================================== -->

  <map:views>
    <map:view name="content" from-label="content">
      <map:serialize type="xml"/>
    </map:view>

    <map:view from-label="content" name="pretty-content">
      <map:transform src="context://stylesheets/system/xml2html.xslt"/>
      <map:serialize type="html"/>
    </map:view>

    <map:view name="links" from-position="last">
      <map:serialize type="links"/>
    </map:view>
  </map:views>

<!-- =========================== Pipelines
================================= -->

  <map:pipelines>
    <map:pipeline>
      <map:match pattern="">
        <map:redirect-to uri="welcome"/>
      </map:match>

      <map:match pattern="welcome">
        <map:generate src="samples.xml"/>
        <map:transform
src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
          <map:parameter name="contextPath"
value="{request:contextPath}"/>
        </map:transform>
        <map:serialize/>
      </map:match>
     <map:match pattern="db/**">
        <map:match type="request-parameter" pattern="xpath">
          <map:generate
src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
          <map:serialize type="xml"/>
        </map:match>
        <map:generate src="xmldb:xindice://localhost:8080/db/{1}"/>
        <map:serialize type="xml"/>
      </map:match>

    </map:pipeline>

  </map:pipelines>
</map:sitemap>


Brian

> Philipp,
> 
> I just ran the example RetrieveDocument.java code
> against my Xindice collection.  I am using the 1/3/04
> CVS checkout of xindice (1.1b4-dev).  I obtained clean
> XML information printed out.
> 
> I did a trace as the call was done, but unfortunately
> the information is compressed and encoded.  I'll have
> to decode it and then uncompress it to find out if
> there was a problem again.
> 
> However, both the example java program and Cocoon
> 2.1.4-dev from 1/3/04 generated clean xml output.
> 
> /mde/

Reply via email to