You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Christian Geisert <ch...@isu-gmbh.de> on 2003/04/23 00:17:40 UTC

Problem with building docs - which Forrest version?

Hi,

I just tried to build the docs and got a validation error (content of
element type "li" must match ... and I remembered something about a dtd
change).
Ok, no problem my Forrest version (0.3) is bit outdated so I'll just get
the latest CVS ... Doh error in validate-sitemap (the reason for this
is probably the cocoon update in forrest).

No big deal to fix either of these errors but I'd like first to discuss
which Forrest version we should use. Latest release or latest CVS?

Christian



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


Re: Problem with building docs - which Forrest version?

Posted by Jeff Turner <je...@apache.org>.
On Fri, Apr 25, 2003 at 10:27:36AM -0600, Victor Mote wrote:
> Jeff Turner wrote:
> 
> > I assume you'll want to stick to released versions, so I've made the
> > forrestbot use 0.4 proper.
> 
> Actually, I am kind of taking the attitude that forrestbot is an
> infrastructure tool, and we'll let you guys worry about which version to
> use, which skins to use, etc. I'm kind of looking at it as a utility like
> gump -- set it up once, and it becomes part of the infrastructure.

That's the idea, but it should always be possible for individuals to
reproduce the forrestbot-generated site.

...
> > Attached is another patch for compliance2html.xsl which removes the
> > pdfdoc.gif link, and a patch which fixes a typo.
> 
> I don't see the attachments here. Don't worry about the first item -- I
> think I can handle that. I am interested in the second.

I suck at attachments :P  Anyway, seems you've found both issues.

...
> > Cocoon 'crawls' pages, recursively following links.  By removing the link
> > to compliance.pdf, Cocoon didn't try to render the PDF, and didn't break
> > on the bad .xsl file.
> 
> I understand that OK. What I don't follow is this: When the link is in
> place, Cocoon builds the PDF file. It was invalid as far as Acrobat was
> concerned, but it was a real file (I don't know what size -- perhaps zero --
> I don't know how to see the actual filesystem). Since the file existed, I
> was surprised that Cocoon would throw the NPE when trying to build the HTML.

Cocooon rendered compliance.html, then threw a NPE on compliance.pdf and
wrote a zero-byte file.
> 
> > > When I first started the stylesheets, I simply cut & pasted from
> > > real Forrest-generated html on our live site. The import is an
> > > effort to tie it more closely to the standard stylesheets. More can
> > > be done with this, if we modularize the standard stylesheets a bit.
> > > I intend to (eventually) submit a patch to Forrest for this.
> >
> > One option is to first apply compliance2fo, and then apply the standard
> > document2fo afterwards.
> 
> I think you must mean compliance2document, then document2fo? I am under the
> impression that I can't get the table color-coding through the document dtd.
> Also, it has a unique TOC now.

I mean, instead of doing:

    <map:transform src="resources/stylesheets/compliance2fo.xsl" />

Where compliance2fo.xsl has a complicated import:

  <xsl:import href="../../skins/common/xslt/fo/document2fo.xsl"/>

Just use two stylesheets in series:

    <map:transform src="resources/stylesheets/compliance2fo.xsl" />
    <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl" />

Where each stylesheet does part of the job.


--Jeff

> Victor Mote
> 

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


RE: Problem with building docs - which Forrest version?

Posted by Victor Mote <vi...@outfitr.com>.
Victor Mote wrote:

> > Attached is another patch for compliance2html.xsl which removes the
> > pdfdoc.gif link, and a patch which fixes a typo.
>
> I don't see the attachments here. Don't worry about the first item -- I
> think I can handle that. I am interested in the second.

OK, you're probably talking about the "extenstions" typo that shows up in
the log. I just fixed that a few minutes ago (a result of work committed
yesterday). Thanks.

Victor Mote


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


RE: Problem with building docs - which Forrest version?

Posted by Victor Mote <vi...@outfitr.com>.
Jeff Turner wrote:

> I assume you'll want to stick to released versions, so I've made the
> forrestbot use 0.4 proper.

Actually, I am kind of taking the attitude that forrestbot is an
infrastructure tool, and we'll let you guys worry about which version to
use, which skins to use, etc. I'm kind of looking at it as a utility like
gump -- set it up once, and it becomes part of the infrastructure. The
change that you have made does highlight the usefulness of the modularized
stylesheets that I mentioned -- if that is set up properly, there should be
very little maintenance on the user's part for custom stylesheets when an
upgrade of forrestbot occurs.

> Attached is another patch for compliance2html.xsl which removes the
> pdfdoc.gif link, and a patch which fixes a typo.

I don't see the attachments here. Don't worry about the first item -- I
think I can handle that. I am interested in the second.

BTW, the patch to the compliance2fo.xsl did the trick. The latest forrestbot
build has the NPE gone & is producing a valid PDF. Thanks for tracking that
down.

> > The error that I mentioned wasn't on the image itself, but on
> the link to
> > the pdf file (I probably said it wrong). Somehow (you probably know),
> > something in Forrest/Cocoon knew the pdf was bad & this threw
> the NPE when
> > building the HTML file. If I left the link out of the HTML
> stylesheet, the
> > HTML file built without the NPE.
>
> Cocoon 'crawls' pages, recursively following links.  By removing the link
> to compliance.pdf, Cocoon didn't try to render the PDF, and didn't break
> on the bad .xsl file.

I understand that OK. What I don't follow is this: When the link is in
place, Cocoon builds the PDF file. It was invalid as far as Acrobat was
concerned, but it was a real file (I don't know what size -- perhaps zero --
I don't know how to see the actual filesystem). Since the file existed, I
was surprised that Cocoon would throw the NPE when trying to build the HTML.
Is it trying to open the PDF & read the first byte or something like that?

> > When I first started the stylesheets, I simply cut & pasted from real
> > Forrest-generated html on our live site. The import is an
> effort to tie it
> > more closely to the standard stylesheets. More can be done with
> this, if we
> > modularize the standard stylesheets a bit. I intend to
> (eventually) submit a
> > patch to Forrest for this.
>
> One option is to first apply compliance2fo, and then apply the standard
> document2fo afterwards.

I think you must mean compliance2document, then document2fo? I am under the
impression that I can't get the table color-coding through the document dtd.
Also, it has a unique TOC now.

Victor Mote



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


Re: Problem with building docs - which Forrest version?

Posted by Jeff Turner <je...@apache.org>.
On Fri, Apr 25, 2003 at 01:53:16AM -0600, Victor Mote wrote:
...
> I applied the patch, but... All of our pages seem to be using pdfdoc.gif.
> See, for example:
> http://xml.apache.org/fop/download.html
> Right click the logo & look at "Properties" (or view source)

That had me confused.  Turns out forrestbot.cocoondev.org was using a
version of Forrest after 0.4, but before any major changes (Cocoon
upgrade, sitemap refactor).  For FOP, the only practical difference is
that PDF icon.

I assume you'll want to stick to released versions, so I've made the
forrestbot use 0.4 proper.

Attached is another patch for compliance2html.xsl which removes the
pdfdoc.gif link, and a patch which fixes a typo.

> The error that I mentioned wasn't on the image itself, but on the link to
> the pdf file (I probably said it wrong). Somehow (you probably know),
> something in Forrest/Cocoon knew the pdf was bad & this threw the NPE when
> building the HTML file. If I left the link out of the HTML stylesheet, the
> HTML file built without the NPE.

Cocoon 'crawls' pages, recursively following links.  By removing the link
to compliance.pdf, Cocoon didn't try to render the PDF, and didn't break
on the bad .xsl file.

> When I first started the stylesheets, I simply cut & pasted from real
> Forrest-generated html on our live site. The import is an effort to tie it
> more closely to the standard stylesheets. More can be done with this, if we
> modularize the standard stylesheets a bit. I intend to (eventually) submit a
> patch to Forrest for this.

One option is to first apply compliance2fo, and then apply the standard
document2fo afterwards.

> Thanks for the great support -- I don't know anywhere else in the world
> where you get support without even asking for it!

Forrest can be such a PITA, we pretty much have to ;)

--Jeff

> Victor Mote
> 

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


RE: Problem with building docs - which Forrest version?

Posted by Victor Mote <vi...@outfitr.com>.
Jeff Turner wrote:

> Forrest (Cocoon) error messages are fairly useless.  In the case, the NPE
> is caused by the compliance2fo.xsl stylesheet breaking due to an
> incorrect xsl:import path.  The attached patch fixes this.  Even then,
> there is still something wrong with the XSL, as the generated PDF only
> contains the introductory paragraph.

I knew the pdf was causing the problem in the html, and spent a whole week
trying to fix it. Your patch looks familiar -- I think I tried that, but I
probably tried it on my local machine running Forrest CVS. The "forrestbot
runs the latest ..." got me there too. Anyway I applied the patch, so we'll
see what happens.

You are correct that the stylesheet needs some work. I commented out almost
all of it in an effort to make the output as simple as possible, thinking
that I was doing something that FOP didn't like. However, even apart from
that, it puts out some pretty ugly stuff right now. I'll work on that.

> The second patch fixes the PDF link (printer.gif, not pdfdoc.gif which
> only exists in CVS Forrest).

I applied the patch, but... All of our pages seem to be using pdfdoc.gif.
See, for example:
http://xml.apache.org/fop/download.html
Right click the logo & look at "Properties" (or view source)

The error that I mentioned wasn't on the image itself, but on the link to
the pdf file (I probably said it wrong). Somehow (you probably know),
something in Forrest/Cocoon knew the pdf was bad & this threw the NPE when
building the HTML file. If I left the link out of the HTML stylesheet, the
HTML file built without the NPE.

When I first started the stylesheets, I simply cut & pasted from real
Forrest-generated html on our live site. The import is an effort to tie it
more closely to the standard stylesheets. More can be done with this, if we
modularize the standard stylesheets a bit. I intend to (eventually) submit a
patch to Forrest for this.

Thanks for the great support -- I don't know anywhere else in the world
where you get support without even asking for it!

Victor Mote


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


Re: Problem with building docs - which Forrest version?

Posted by Jeff Turner <je...@apache.org>.
On Thu, Apr 24, 2003 at 06:34:01PM +0200, Christian Geisert wrote:
> Victor Mote schrieb:
> >Christian Geisert wrote:
> 
> [ ..]
> 
> >>No big deal to fix either of these errors but I'd like first to discuss
> >>which Forrest version we should use. Latest release or latest CVS?

Latest release (0.4) I'd suggest, as CVS Forrest breaks backwards-compat
for sites like FOP that use a custom sitemap.

> >Is this for the release? If so, I would be tempted to 1) "publish" the
> >forrestbot version, then 2) just check that version out from
> >icarus.apache.org/home/cvs/xml-site/targets/fop. One of the many nice 
> >things
> 
> The docs for the maintenance branch are a bit different (no Changes and
> Todo pages, no Development/Alt Design) which I merged manually from HEAD
> for the previous RCs. Another reason against using ths docs from
> xml-site is that it would make it harder to create a distribution again
> later from CVS (say build the release again in five weeks)
> And I prefer changing the docs offline (forrest run) but thats just a
> matter of taste..
> 
> I think I'll just temporary remove the <warning> from the <li> for RC3.
> 
> >about using forrestbot is that you let the forrest guys worry about which
> >versions are stable, which skins & dtds to use, etc.
> 
> According to the webpage Forrestbot is using latest Forrest but it
> doesn't seem to use the validate-sitemap target ;-)

Sorry, I should have updated that.  The forrestbot.cocoondev.org site is
using Forrest 0.4, not the CVS version.

> [..]
> 
> >BTW, if you do use forrest to do a doc build, you will see some errors.
> >There is an NPE when it creates compliance.html. I have narrowed it down to
> >the link on the pdf icon in that document. The pdf that is generated is not
> >valid, and that appears to be the cause of the problem. When I run it using
> >plain old FOP (trunk, current cvs), the pdf builds fine (well, valid
> >anyway), so I suspect that this is because forrestbot is using an older
> >version of FOP. I expect this error to go away when they upgrade. Even
> >though we get an NPE, the html file seems fine. The other errors are 
> >related
> >to what looks like a font definition. I haven't tried to track it down.

Forrest (Cocoon) error messages are fairly useless.  In the case, the NPE
is caused by the compliance2fo.xsl stylesheet breaking due to an
incorrect xsl:import path.  The attached patch fixes this.  Even then,
there is still something wrong with the XSL, as the generated PDF only
contains the introductory paragraph.

The second patch fixes the PDF link (printer.gif, not pdfdoc.gif which
only exists in CVS Forrest).


--Jeff

> 
> Christian
> 

RE: Problem with building docs - which Forrest version?

Posted by Victor Mote <vi...@outfitr.com>.
Christian Geisert wrote:

> The docs for the maintenance branch are a bit different (no Changes and
> Todo pages, no Development/Alt Design) which I merged manually from HEAD
> for the previous RCs. Another reason against using ths docs from
> xml-site is that it would make it harder to create a distribution again
> later from CVS (say build the release again in five weeks)
> And I prefer changing the docs offline (forrest run) but thats just a
> matter of taste..

That's fine. (Off-topic) As I have been pounding on doc over the past
several weeks, I have thought several times about asking you to write a
document on our release mechanics, especially with the dual
lines-of-development issues. If you have notes, I'll be glad to do the
write-up. It is certainly not high-priority, but perhaps worthwhile.

> According to the webpage Forrestbot is using latest Forrest but it
> doesn't seem to use the validate-sitemap target ;-)

I am not sure. Forrest is a fast-moving target. BTW, I'm sorry I don't know
the answer to your original question (which version of Forrest should I
use?) I suppose that is up to your discretion, but I would imagine it should
be the one they have designated as the latest stable release. Perhaps this
goes into the document after you decide.

Victor Mote


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


Re: Problem with building docs - which Forrest version?

Posted by Christian Geisert <ch...@isu-gmbh.de>.
Victor Mote schrieb:
> Christian Geisert wrote:

[ ..]

>>No big deal to fix either of these errors but I'd like first to discuss
>>which Forrest version we should use. Latest release or latest CVS?
> 
> Is this for the release? If so, I would be tempted to 1) "publish" the
> forrestbot version, then 2) just check that version out from
> icarus.apache.org/home/cvs/xml-site/targets/fop. One of the many nice things

The docs for the maintenance branch are a bit different (no Changes and
Todo pages, no Development/Alt Design) which I merged manually from HEAD
for the previous RCs. Another reason against using ths docs from
xml-site is that it would make it harder to create a distribution again
later from CVS (say build the release again in five weeks)
And I prefer changing the docs offline (forrest run) but thats just a
matter of taste..

I think I'll just temporary remove the <warning> from the <li> for RC3.

> about using forrestbot is that you let the forrest guys worry about which
> versions are stable, which skins & dtds to use, etc.

According to the webpage Forrestbot is using latest Forrest but it
doesn't seem to use the validate-sitemap target ;-)

[..]

> BTW, if you do use forrest to do a doc build, you will see some errors.
> There is an NPE when it creates compliance.html. I have narrowed it down to
> the link on the pdf icon in that document. The pdf that is generated is not
> valid, and that appears to be the cause of the problem. When I run it using
> plain old FOP (trunk, current cvs), the pdf builds fine (well, valid
> anyway), so I suspect that this is because forrestbot is using an older
> version of FOP. I expect this error to go away when they upgrade. Even
> though we get an NPE, the html file seems fine. The other errors are related
> to what looks like a font definition. I haven't tried to track it down.

The "Font specified in font.properties not found" warning only happens with
JDK1.3 under Linux and is no serious problem at all IIRC.


Christian


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


RE: Problem with building docs - which Forrest version?

Posted by Victor Mote <vi...@outfitr.com>.
Christian Geisert wrote:

> I just tried to build the docs and got a validation error (content of
> element type "li" must match ... and I remembered something about a dtd
> change).
> Ok, no problem my Forrest version (0.3) is bit outdated so I'll just get
> the latest CVS ... Doh error in validate-sitemap (the reason for this
> is probably the cocoon update in forrest).
>
> No big deal to fix either of these errors but I'd like first to discuss
> which Forrest version we should use. Latest release or latest CVS?

Is this for the release? If so, I would be tempted to 1) "publish" the
forrestbot version, then 2) just check that version out from
icarus.apache.org/home/cvs/xml-site/targets/fop. One of the many nice things
about using forrestbot is that you let the forrest guys worry about which
versions are stable, which skins & dtds to use, etc.

I just did a "publish" a few minutes ago, which should show up on the live
site in about 3 hours. It is 100% up-to-date with the repository content
(until I start hacking away at it again, probably tomorrow). I also just got
done cleaning out the web repository of files that I have deleted recently,
so it should be clean and up-to-date if you want to use its contents.

BTW, if you do use forrest to do a doc build, you will see some errors.
There is an NPE when it creates compliance.html. I have narrowed it down to
the link on the pdf icon in that document. The pdf that is generated is not
valid, and that appears to be the cause of the problem. When I run it using
plain old FOP (trunk, current cvs), the pdf builds fine (well, valid
anyway), so I suspect that this is because forrestbot is using an older
version of FOP. I expect this error to go away when they upgrade. Even
though we get an NPE, the html file seems fine. The other errors are related
to what looks like a font definition. I haven't tried to track it down.

Victor Mote



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