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 Simon Pepping <sp...@leverkruid.nl> on 2004/07/23 20:41:34 UTC

fox validation

When I render an fo file that is generated with the docbook
stylesheets, I get this validation error:

java.lang.IllegalArgumentException: Error(2/12476): fox:outline is not a valid child element of fo:root.
org.apache.fop.apps.FOPException: java.lang.IllegalArgumentException: Error(2/12476): fox:outline is not a valid child element of fo:root.
	at org.apache.fop.apps.FOFileHandler.render(FOFileHandler.java:103)
	at org.apache.fop.apps.Fop.main(Fop.java:55)

The code in Root shows that fox:bookmarks is the only allowed fox
child of fo:root. It is not clear that that is true. The web page
extensions.html does not even mention fox:bookmarks. The example file
examples/fo/basic/pdfoutline.fo clearly embeds fox:outline elements in
fox:bookmarks. The docbook stylesheets authors place fox:outline
elements directly in fo:root. FOP-0.20.5 has no problem with this
arrangement. Even if it is true, it creates compatibility problems.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.nl


Re: fox validation

Posted by Glen Mazza <gr...@yahoo.com>.
Oh please do...

--- Simon Pepping <sp...@leverkruid.nl> wrote:
> After that I
> want to work on the layout.
> 
> Regards, Simon
> 


Re: fox validation

Posted by Simon Pepping <sp...@leverkruid.nl>.
Thanks. I did not know about the change. It certainly is a better
writing style.

I am still finishing the details of my documentation. After that I
want to work on the layout.

Regards, Simon

On Fri, Jul 23, 2004 at 09:20:50PM -0700, Glen Mazza wrote:
> Yes, the way I see it, one of FOP's successes will be
> our close adherence to JAXP.  Another one will be a
> very strict and solid FO validation component--a "firm
> handshake" that hopefully will paint FOP as a
> Tomcat-like reference implementation for XSL.
> 
> BTW, Simon, and everyone else, there's about 30 or so
> validateChildNodes() left to be written--many of them
> quite complex.  Feel free to help out if you'd like!
> 
> Glen
> 
> --- "J.Pietschmann" <j3...@yahoo.de> wrote:
> > Simon Pepping wrote:
> > > The code in Root shows that fox:bookmarks is the
> > only allowed fox
> > > child of fo:root. It is not clear that that is
> > true. The web page
> > > extensions.html does not even mention
> > fox:bookmarks. The example file
> > > examples/fo/basic/pdfoutline.fo clearly embeds
> > fox:outline elements in
> > > fox:bookmarks. The docbook stylesheets authors
> > place fox:outline
> > > elements directly in fo:root. FOP-0.20.5 has no
> > problem with this
> > > arrangement. Even if it is true, it creates
> > compatibility problems.
> > 
> > This was changed in the redesign, outlines for
> > bookmarks must now
> > be put into a fox:bookmark. Yes, this is
> > incompatible but cleans up
> > pathological cases like
> >   <fo:root>
> >     <fox:outline>...</fox:outline>
> >     <fo:layout-master-set ... />
> >     <fox:outline>...</fox:outline>
> >     <fo:page-sequence>
> >     </fo:page-sequence>
> >     <fox:outline>...</fox:outline>
> >     <fo:page-sequence>
> >     </fo:page-sequence>
> >   </fo:root>
> > Some bookmarks in the above case wont be rendered,
> > and it's quite
> > difficult to reliably check for this condition. If
> > there can only
> > be a single fox:bookmark, error checking is much
> > easier. Some would
> > also claim it enforces better writing style.
> > 
> > J.Pietschmann
> > 
> > 
> 

-- 
Simon Pepping
home page: http://www.leverkruid.nl


Re: fox validation

Posted by Glen Mazza <gr...@yahoo.com>.
Yes, the way I see it, one of FOP's successes will be
our close adherence to JAXP.  Another one will be a
very strict and solid FO validation component--a "firm
handshake" that hopefully will paint FOP as a
Tomcat-like reference implementation for XSL.

BTW, Simon, and everyone else, there's about 30 or so
validateChildNodes() left to be written--many of them
quite complex.  Feel free to help out if you'd like!

Glen

--- "J.Pietschmann" <j3...@yahoo.de> wrote:
> Simon Pepping wrote:
> > The code in Root shows that fox:bookmarks is the
> only allowed fox
> > child of fo:root. It is not clear that that is
> true. The web page
> > extensions.html does not even mention
> fox:bookmarks. The example file
> > examples/fo/basic/pdfoutline.fo clearly embeds
> fox:outline elements in
> > fox:bookmarks. The docbook stylesheets authors
> place fox:outline
> > elements directly in fo:root. FOP-0.20.5 has no
> problem with this
> > arrangement. Even if it is true, it creates
> compatibility problems.
> 
> This was changed in the redesign, outlines for
> bookmarks must now
> be put into a fox:bookmark. Yes, this is
> incompatible but cleans up
> pathological cases like
>   <fo:root>
>     <fox:outline>...</fox:outline>
>     <fo:layout-master-set ... />
>     <fox:outline>...</fox:outline>
>     <fo:page-sequence>
>     </fo:page-sequence>
>     <fox:outline>...</fox:outline>
>     <fo:page-sequence>
>     </fo:page-sequence>
>   </fo:root>
> Some bookmarks in the above case wont be rendered,
> and it's quite
> difficult to reliably check for this condition. If
> there can only
> be a single fox:bookmark, error checking is much
> easier. Some would
> also claim it enforces better writing style.
> 
> J.Pietschmann
> 
> 


Re: fox validation

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Simon Pepping wrote:
> The code in Root shows that fox:bookmarks is the only allowed fox
> child of fo:root. It is not clear that that is true. The web page
> extensions.html does not even mention fox:bookmarks. The example file
> examples/fo/basic/pdfoutline.fo clearly embeds fox:outline elements in
> fox:bookmarks. The docbook stylesheets authors place fox:outline
> elements directly in fo:root. FOP-0.20.5 has no problem with this
> arrangement. Even if it is true, it creates compatibility problems.

This was changed in the redesign, outlines for bookmarks must now
be put into a fox:bookmark. Yes, this is incompatible but cleans up
pathological cases like
  <fo:root>
    <fox:outline>...</fox:outline>
    <fo:layout-master-set ... />
    <fox:outline>...</fox:outline>
    <fo:page-sequence>
    </fo:page-sequence>
    <fox:outline>...</fox:outline>
    <fo:page-sequence>
    </fo:page-sequence>
  </fo:root>
Some bookmarks in the above case wont be rendered, and it's quite
difficult to reliably check for this condition. If there can only
be a single fox:bookmark, error checking is much easier. Some would
also claim it enforces better writing style.

J.Pietschmann