Generating pdf from xsl and xml file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating pdf from xsl and xml file

prasmitapansare@gmail.com
I am trying to generate PDF from input xml and xsl file but i am getting below error, even if i remove empty tags for fo:table-cell. i am getting wrong output. I am using FOP1.0 version.

SEVERE: Exception
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: "fo:table-cell" is missing child elements. Required content model: marker* (%block;)+ (No context info available)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: "fo:table-cell" is missing child elements. Required content model: marker* (%block;)+ (No context info avail
able)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1410)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:392)
        at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:246)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:139)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
        ... 3 more
Reply | Threaded
Open this post in threaded view
|

Re: Generating pdf from xsl and xml file

G. Ken Holman
At 2012-01-03 01:03 -0800, [hidden email] wrote:
>I am trying to generate PDF from input xml and xsl file but i am getting
>below error, even if i remove empty tags for fo:table-cell. i am getting
>wrong output. I am using FOP1.0 version.
>
>SEVERE: Exception
>javax.xml.transform.TransformerException:
>org.apache.fop.fo.ValidationException: "fo:table-cell" is missing child
>elements. Required content model: marker* (%block;)+

The message is telling you that you have an empty table cell, and
that the specification requires that table cells not be empty.

If you are removing the empty table cell, then perhaps you are
leaving your row empty, and that is also not allowed in the specification.

Inspect your XSLT regarding why you are creating empty table cells
and, at the least, throw in an empty block so that the table cell is not empty.

I hope this helps.

. . . . . . . . . . Ken

--
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/uoui9h
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/f/
G. Ken Holman                   mailto:[hidden email]
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


Reply | Threaded
Open this post in threaded view
|

Re: Generating pdf from xsl and xml file

Giuseppe Briotti-2
I agree with Ken.

Suggestion:

When I first try a new XML-XSLT-FO-PDF transform, I always take a look
at the generate FO. There are some unofficial XSD that are able to
validate the generated FO against the specs. This is a good help while
debugging.

2012/1/3 G. Ken Holman <[hidden email]>:

> At 2012-01-03 01:03 -0800, [hidden email] wrote:
>>
>> I am trying to generate PDF from input xml and xsl file but i am getting
>> below error, even if i remove empty tags for fo:table-cell. i am getting
>> wrong output. I am using FOP1.0 version.
>>
>> SEVERE: Exception
>> javax.xml.transform.TransformerException:
>> org.apache.fop.fo.ValidationException: "fo:table-cell" is missing child
>> elements. Required content model: marker* (%block;)+
>
>
> The message is telling you that you have an empty table cell, and that the
> specification requires that table cells not be empty.
>
> If you are removing the empty table cell, then perhaps you are leaving your
> row empty, and that is also not allowed in the specification.
>
> Inspect your XSLT regarding why you are creating empty table cells and, at
> the least, throw in an empty block so that the table cell is not empty.
>
> I hope this helps.
>
> . . . . . . . . . . Ken
>
> --
> Contact us for world-wide XML consulting and instructor-led training
> Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/uoui9h
> Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/f/
> G. Ken Holman                   mailto:[hidden email]
> Google+ profile: https://plus.google.com/116832879756988317389/about
> Legal business disclaimers:    http://www.CraneSoftwrights.com/legal
>
>



--

Giuseppe Briotti
[hidden email]

"Alme Sol, curru nitido diem qui
promis et celas aliusque et idem
nasceris, possis nihil urbe Roma
visere maius."
(Orazio)