You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Rick Tessner <ri...@apache.org> on 2005/01/05 21:20:04 UTC

[Fwd: Re: Help w/transforming an aggregated doc]

[get this back on the Forrest user list ...]

Rick

Re: Help w/transforming an aggregated doc

Posted by Andy J <se...@gmail.com>.
Even after creating a stylesheet to add the doctype, the XML wasn't
being rendered to XML.  In the end my problem was that my aggregate
had element attributes like this:
.. snip .. 
        <map:aggregate element="document">
          <map:part src="cocoon:/header" element="header"/>
          <map:part src="cocoon:/projinfo" element="section"/>
        </map:aggregate>

The problem was - those aggregate documents already had a header and a
section element so the doc looked like:

<header><header>real
header</header></header><section><body><section>real section starts at
body</section></body></section>

After removing the element attributes altogether , it transfroms to
HTML just fine. . .

- Andy


On Thu, 6 Jan 2005 13:54:53 +1100, David Crossley <cr...@apache.org> wrote:
> Andy J wrote:
> > > Rick Tessner wrote:
> >
> > > Does the PDF that's generated contain content or just the title page?
> > > The reason I ask is because in the above sitemap, you have the
> > > <document> and <header> elements being generated, but I don't see a
> > > <body> element.
> >
> > Yes, it's the full document.  Because I couldn't figure out how to
> > have two aggregates for:
> > DOCUMENT
> >   HEADER
> >   BODY
> >       SECTION
> >       SECTION
> >
> > I just included the body and the section documents all in projinfo and
> > bundled up header+projinfo.
> 
> There are plenty of examples of aggregation in Forrest's sitemaps.
> Have you followed those?
> 
> I have tried to follow this email thread, but i am very confused
> about what you are trying to achieve. Perhaps it would help if
> you clearly described what your goal is, without any assumptions
> about how you think Forrest might work.
> 
> > > If that still doesn't work, could you post the sitemap map:match
> > > elements for cocoon:/header and cocoon:/projinfo?
> >
> > Ok - I will post that tomorrow.  In another response, Ross suggested I
> > type the project.xml URL in and see what it returns.  At the time, it
> > wasn't returning anything.  Now I get the fully formed (minus DOCTYPE)
> > aggregated XML document.  It just doesn't get transformed to HTML.
> 
> If it is missing the DOCTYPE then it won't get handled correctly.
> 
> --David
>

Re: Help w/transforming an aggregated doc

Posted by David Crossley <cr...@apache.org>.
Andy J wrote:
> > Rick Tessner wrote:
> 
> > Does the PDF that's generated contain content or just the title page?
> > The reason I ask is because in the above sitemap, you have the
> > <document> and <header> elements being generated, but I don't see a
> > <body> element.
> 
> Yes, it's the full document.  Because I couldn't figure out how to
> have two aggregates for:
> DOCUMENT
>   HEADER                                       
>   BODY
>       SECTION  
>       SECTION  
> 
> I just included the body and the section documents all in projinfo and
> bundled up header+projinfo.

There are plenty of examples of aggregation in Forrest's sitemaps.
Have you followed those?

I have tried to follow this email thread, but i am very confused
about what you are trying to achieve. Perhaps it would help if
you clearly described what your goal is, without any assumptions
about how you think Forrest might work.

> > If that still doesn't work, could you post the sitemap map:match
> > elements for cocoon:/header and cocoon:/projinfo?
> 
> Ok - I will post that tomorrow.  In another response, Ross suggested I
> type the project.xml URL in and see what it returns.  At the time, it
> wasn't returning anything.  Now I get the fully formed (minus DOCTYPE)
> aggregated XML document.  It just doesn't get transformed to HTML.

If it is missing the DOCTYPE then it won't get handled correctly.

--David

Re: [Fwd: Re: Help w/transforming an aggregated doc]

Posted by Andy J <se...@gmail.com>.
[Oops!  Sorry, somehow got the wrong addressee on the last response.]

> On Wed, 2005-01-05 at 12:20 -0800, Rick Tessner wrote:

> Does the PDF that's generated contain content or just the title page?
> The reason I ask is because in the above sitemap, you have the
> <document> and <header> elements being generated, but I don't see a
> <body> element.

Yes, it's the full document.  Because I couldn't figure out how to
have two aggregates for:
DOCUMENT
  HEADER                                       
  BODY
      SECTION  
      SECTION  

I just included the body and the section documents all in projinfo and
bundled up header+projinfo.
 
> If that still doesn't work, could you post the sitemap map:match
> elements for cocoon:/header and cocoon:/projinfo?

Ok - I will post that tomorrow.  In another response, Ross suggested I
type the project.xml URL in and see what it returns.  At the time, it
wasn't returning anything.  Now I get the fully formed (minus DOCTYPE)
aggregated XML document.  It just doesn't get transformed to HTML.

> Hope this helps,
> 
> Rick

Yes - thanks! 

- Andy

Re: [Fwd: Re: Help w/transforming an aggregated doc]

Posted by Rick Tessner <ri...@apache.org>.
On Wed, 2005-01-05 at 12:20 -0800, Rick Tessner wrote:

> > I think this is the last iteration!  I took out a lot of the stuff
> > that was (incorrectly) in my sitemap so maybe this will get simpler
> > now.  The PDF is still generated but the HTML is still blank.  Here's
> > the pipeline:
> > 
> >  <map:pipelines>
> >     <!-- internal pipeline for "header" and "projinfo" omitted -->
> >     <map:pipeline>
> >       <map:match pattern="**/*projects.xml">
> >         <map:aggregate element="document">
> >           <map:part src="cocoon:/header" element="header"/>
> >           <map:part src="cocoon:/projinfo" element="section"/>
> >         </map:aggregate>
> >         <!--<map:transform type="xslt"
> > src="{project:stylesheets-dir}/xml2document.xsl"/> -->
> >         <map:serialize type="xml"/>
> >       </map:match>
> >   </map:pipeline>

Does the PDF that's generated contain content or just the title page?
The reason I ask is because in the above sitemap, you have the
<document> and <header> elements being generated, but I don't see a
<body> element.

Try changing the <map:part src="cocoon:/projinfo" element="section"/> to
<map:part src="cocoon:/projinfo" element="body"/>.

If that still doesn't work, could you post the sitemap map:match
elements for cocoon:/header and cocoon:/projinfo?

Hope this helps,

Rick