forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy J <sendtoa...@gmail.com>
Subject Re: Help w/transforming an aggregated doc
Date Tue, 04 Jan 2005 19:13:32 GMT
Thanks, Ross.

On Tue, 04 Jan 2005 18:20:05 +0000, Ross Gardler <rgardler@apache.org> wrote:
> 
> This is confusing me, I must be missing something simple. If you are
> getting the PDF then the XML must be generated correctly.
> 

> 
> Did you try http://localhost:8888/project/projects.xml? You should see
> the XML that is generated by your aggregation and it should be a valid
> XDoc. Does it have the DTD defined in it?
 
I have not been running the webapp.  On this suggestion I did forrest
run and the XML was not there.  If it's transformed to HTML within the
pipeline, would it still be there?

> You can also look in PROJECT_ROOT/build/webapp/WEB-INF/logs for any
> useful information (in particular core.log and error.log).

Great - I'll use the webapp from now on so I can see that info.  I've
made progress - now I get the aggregated document in HTML but it is
not skinned.  This is my pipeline (as it begins to look more and more
like the main forrest sitemap.xmap):

    <map:pipeline>
      <map:match pattern="**/*projects.html">
        <map:aggregate element="document">
          <map:part src="cocoon:/header" element="header"/>
          <map:part src="cocoon:/projinfo" element="section"/>
        </map:aggregate>
        <map:transform type="idgen"/>
        <map:transform type="xinclude"/>
        <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
        <map:transform type="log">
          <map:parameter name="logfile" value="d:/temp/logfile.log"/>
          <map:parameter name="append" value="no"/>
        </map:transform>

        <map:serialize type="html"/>
        <map:call resource="skinit">
          <map:parameter name="type" value="document2html"/>
          <map:parameter name="path" value="{1}{2}.html"/>
          <map:parameter name="notoc" value="false"/>
        </map:call>
      </map:match>
    </map:pipeline>

I think the aggregate is working because the actual source code that
ends up in the HTML is this:

<?xml version="1.0" encoding="ISO-8859-1"?><document><header><header>

    <title>Header FILE title title title!</title> 
  </header></header><section id=""><body>
  <section id="This+is+a+section+document+using+the+forrest+dtd.">
    <title>This is a section document using the forrest dtd.</title>
    <p>This is the first paragraph</p>
    <p>This is the secondparagraph</p>
    <p>This is the third paragraph</p>
  </section>
  <section id="Section+TWO">
    <title>Section TWO</title>
    <p>SECOND PARAGRAPH.</p>
    <p>THIRD PARAGRAPH.</p>
    <p>FOURTH PARAGRAPH.</p>
  </section>
</body></section></document>

This is a correct aggregation of the two documents (albeit, only in
XML).  Can you see a problem with the XSL transformation that would
prevent this from being skinned to html?

Thanks for your help!  It's a relief to have someone who can help get
ramped up - I have to say there's a bit of a learning curve but it
sure seems like it will be powerful.

-- Andy

> Ross
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005
> 
>

Mime
View raw message