Re: TransformerException: fo:page-sequence is not a valid child element of fo:flow

2008-01-16 Thread Travis Staloch
Jeremias,

 That means there's an fo:page-sequence element as a child of an fo:flow
 element and that is illegal. And now you need to find out why and
 correct the XSLT. Given that I see the term docbook in the filename it
 could also be that your DocBook XML is invalid in the first place and
 you get a bad result because of that. But maybe there's a bug in the
 DocBook XSLTs which is less likely. I suggest validating your XMLs (i.e.
 my.book) first.

Thank you.  I had been using docbook dtds for validation but getting very 
extensive 
validation messages (too extensive for my taste).  I began using relaxng 
validation 
with relames and its a bit easier to understand.  Anyway, after getting my 
docbookml 
to validate, the error in the title went away and I have been able to generate 
valid 
fo and a nice pdf.  

Also, thanks to Andreas for pointing out the offending page-sequence elements.  

Travis



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Re: TransformerException: fo:page-sequence is not a valid child element of fo:flow

2008-01-14 Thread Jeremias Maerki
Why not? The error message tells you exactly what is wrong and where.
It's a ValidationException which means your XML/XSL-FO isn't valid. The
error message says:
fo:page-sequence is not a valid child element of fo:flow.
(on line 1, position 56740)

That means there's an fo:page-sequence element as a child of an fo:flow
element and that is illegal. And now you need to find out why and
correct the XSLT. Given that I see the term docbook in the filename it
could also be that your DocBook XML is invalid in the first place and
you get a bad result because of that. But maybe there's a bug in the
DocBook XSLTs which is less likely. I suggest validating your XMLs (i.e.
my.book) first.

On 14.01.2008 05:48:09 Travis Staloch wrote:
 Hello,
 
 I'm trying to use fop along with xsltproc to create a pdf from docbook xml.  
 xsltproc successfully creates an fo document with the command:
 xsltproc /usr/share/sgml/docbook/xsl-stylesheets-1.73.2-2.fc8/fo/docbook.xsl 
 my.book  sf.fo
 
 However, when I run the fop command:
 fop sf.fo -pdf sf.pdf
 I get the error:
 SEVERE: Exception
 javax.xml.transform.TransformerException: 
 org.apache.fop.fo.ValidationException: 
 file:///home/trav/open/SportsFeed/doc/help/docbook/sf.fo:1:56740: 
 Error(1/56740): fo:page-sequence is not a valid child element of fo:flow.
 at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
 at
  org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
 at org.apache.fop.cli.Main.startFOP(Main.java:166)
 at org.apache.fop.cli.Main.main(Main.java:197)
 
 Can anyone provide any guidance on what might be going wrong?  I have fop 
 0.94 with java version 1.4.2_16.  I've attached the fo document.  When I 
 looked at the fo document, I couldn't find any fo:page-sequence elements 
 which were children of fo:flow.  So I'm not really sure what the problem is.
 
 Thanks for any advice,
 
 Travis


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TransformerException: fo:page-sequence is not a valid child element of fo:flow

2008-01-14 Thread Andreas L Delmelle

On Jan 14, 2008, at 18:18, Andreas L Delmelle wrote:


On Jan 14, 2008, at 05:48, Travis Staloch wrote:

Hi

I'm trying to use fop along with xsltproc to create a pdf from  
docbook xml.  xsltproc successfully creates an fo document with  
the command:
xsltproc /usr/share/sgml/docbook/xsl-stylesheets-1.73.2-2.fc8/fo/ 
docbook.xsl my.book  sf.fo


However, when I run the fop command:
fop sf.fo -pdf sf.pdf
I get the error:
SEVERE: Exception
javax.xml.transform.TransformerException:  
org.apache.fop.fo.ValidationException: file:///home/trav/open/ 
SportsFeed/doc/help/docbook/sf.fo:1:56740: Error(1/56740): fo:page- 
sequence is not a valid child element of fo:flow.
at org.apache.fop.cli.InputHandler.transformTo 
(InputHandler.java:168)
at org.apache.fop.cli.InputHandler.renderTo 
(InputHandler.java:115)

at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)

Can anyone provide any guidance on what might be going wrong?
I have fop 0.94 with java version 1.4.2_16.  I've attached the  
fo document.
When I looked at the fo document, I couldn't find any fo:page- 
sequence elements which were children of fo:flow.  So I'm not  
really sure what the problem is.


What it says: you do have a fo:page-sequence that is a child of an  
fo:flow.


I checked this via XPath, and you have 4 page-sequences. 3 of which  
are correct - children of the fo:root, and 1 that ended up in the  
wrong place.


No idea if it will help you much in tracking it down, but if I  
apply indenting to make your FO a bit more human-readable, the  
offending fo:page-sequence starts on line 1066.


Update: in the file you sent, the offending fo:page-sequence can be  
found at line 1, column 57323.


Cheers

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TransformerException: fo:page-sequence is not a valid child element of fo:flow

2008-01-14 Thread Andreas L Delmelle

On Jan 14, 2008, at 05:48, Travis Staloch wrote:

Hi

I'm trying to use fop along with xsltproc to create a pdf from  
docbook xml.  xsltproc successfully creates an fo document with the  
command:
xsltproc /usr/share/sgml/docbook/xsl-stylesheets-1.73.2-2.fc8/fo/ 
docbook.xsl my.book  sf.fo


However, when I run the fop command:
fop sf.fo -pdf sf.pdf
I get the error:
SEVERE: Exception
javax.xml.transform.TransformerException:  
org.apache.fop.fo.ValidationException: file:///home/trav/open/ 
SportsFeed/doc/help/docbook/sf.fo:1:56740: Error(1/56740): fo:page- 
sequence is not a valid child element of fo:flow.
at org.apache.fop.cli.InputHandler.transformTo 
(InputHandler.java:168)
at org.apache.fop.cli.InputHandler.renderTo 
(InputHandler.java:115)

at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)

Can anyone provide any guidance on what might be going wrong?
I have fop 0.94 with java version 1.4.2_16.  I've attached the fo  
document.
When I looked at the fo document, I couldn't find any fo:page- 
sequence elements which were children of fo:flow.  So I'm not  
really sure what the problem is.


What it says: you do have a fo:page-sequence that is a child of an  
fo:flow.


I checked this via XPath, and you have 4 page-sequences. 3 of which  
are correct - children of the fo:root, and 1 that ended up in the  
wrong place.


No idea if it will help you much in tracking it down, but if I apply  
indenting to make your FO a bit more human-readable, the offending  
fo:page-sequence starts on line 1066.




Cheers

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]