xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes K├╝pnsebeck <hne...@gmx.de>
Subject Re: Still struggling with document(), formatting
Date Fri, 07 Apr 2006 13:59:07 GMT
Hi Michael,
the PrintFormat.xsl is buggy, too, it creates html and rr namespaced
elements, one example:

<xsl:copy-of select="//rr:CPatFile/rr:CSection[@sectionID='header']"/>

This means "copy all elements directly to the fo output", including html
and rr elements.

I think you're doing two jobs at once with the stylesheet: information
retrieval and formatting.
Maybe its easier to split this: make one stylesheet that extracts all
information from the xml (and  merge it with the ClientInfo.xml via
document() ) and writes it as a simpler xml-file in your own
intermediate format, then write a stylesheet that does only the
fop-stuff of the intermediate file.
It's probably more work, but it IMHO it's eaysier to handle.

If the html-stuff should be directly translated to fo, have a look at
the html to fo conversion guide at
http://www-128.ibm.com/developerworks/library/x-xslfo2app/
it can save you a lot of work.

good luck, Johannes








Gosselin, Michael wrote:
> All,
>
> I've been talking to folks on the xsl Mulberry list and people here.  I'm
> still struggling getting reports to work.
>
> When I use the original xsl (PrintFormat.xsl) file with fop (on a Unix
> machine, and how do I determine the version?), I get some errors, but I get
> an output file.  Here's the output:
>
> 	AthenaV> fop.sh -xml 06000003_TEST,HOLD_640.xml -xsl PrintFormat.xsl
> -pdf testOutput.pdf
> 	[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> 	[INFO] FOP 0.20.5
> 	[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> 	[INFO] building formatting object tree
> 	[INFO] setting up fonts
> 	[ERROR] Unsupported element encountered: CSection (Namespace:
> urn:Correlagen:RightReport). Source context: unavailable
> 	[ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect,
> etc.) or elements from another supported language.
> 	[ERROR] Unsupported element encountered: Content (Namespace:
> urn:Correlagen:RightReport). Source context: unavailable
> 	[ERROR] Unsupported element encountered: div (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: img (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: br (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: span (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: table (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: tr (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: td (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: i (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: b (Namespace: default).
> Source context: unavailable
> 	[INFO] [1]
> 	[ERROR] no handler defined for urn:Correlagen:RightReport:CSection
> foreign xml
> 	[WARNING] Sum of fixed column widths 396850 greater than maximum
> specified IPD 283464
> 	[ERROR] Error while creating area : Error while recovering Image
> Informations (file:/home/c/fop/fop-0.20.5/images/WilliamSeltzer.gif
> <file:/home/c/fop/fop-0.20.5/images/WilliamSeltzer.gif> ) :
> /home/c/fop/fop-0.20.5/images/WilliamSeltzer.gif (No such file or directory)
> 	[ERROR] Error while creating area : Error while recovering Image
> Informations (file:/home/c/fop/fop-0.20.5/images/DevBatish.gif
> <file:/home/c/fop/fop-0.20.5/images/DevBatish.gif> ) :
> /home/c/fop/fop-0.20.5/images/DevBatish.gif (No such file or directory)
> 	[ERROR] Error while creating area : Error while recovering Image
> Informations (file:/home/c/fop/fop-0.20.5/images/NarasimhanNagan.gif
> <file:/home/c/fop/fop-0.20.5/images/NarasimhanNagan.gif> ) :
> /home/c/fop/fop-0.20.5/images/NarasimhanNagan.gif (No such file or
> directory)
> 	[INFO] [2]
> 	[ERROR] no handler defined for urn:Correlagen:RightReport:CSection
> foreign xml
> 	[INFO] [3]
> 	[ERROR] At least one of minimum, optimum, or maximum IPD must be
> specified on table.
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[ERROR] no handler defined for urn:Correlagen:RightReport:CSection
> foreign xml
> 	[INFO] [4]
> 	[ERROR] At least one of minimum, optimum, or maximum IPD must be
> specified on table.
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[INFO] area contents overflows area in line
> 	[ERROR] no handler defined for urn:Correlagen:RightReport:CSection
> foreign xml
> 	[INFO] [4]
> 	[ERROR] At least one of minimum, optimum, or maximum IPD must be
> specified on table.
> 	[ERROR] no handler defined for urn:Correlagen:RightReport:CSection
> foreign xml
> 	[INFO] Parsing of document complete, stopping renderer
>
> However, when I try to make edits, including the use of document(), I seem
> to be screwing up to the point I get fatal exceptions, formatting issues,
> and who knows what else.
>
> 	AthenaV> fop,sh -xml 06000003_TEST,HOLD_640.xml -xsl
> AthenaFormat.xsl -pdf testbeta.pdf
> 	[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> 	[INFO] FOP 0.20.5
> 	[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> 	[INFO] building formatting object tree
> 	[INFO] setting up fonts
> 	[ERROR] Unsupported element encountered: CSection (Namespace:
> urn:Correlagen:RightReport). Source context: unavailable
> 	[ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect,
> etc.) or elements from another supported language.
> 	[ERROR] Unsupported element encountered: Content (Namespace:
> urn:Correlagen:RightReport). Source context: unavailable
> 	[ERROR] Unsupported element encountered: div (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: img (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: br (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: span (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: table (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: tr (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: td (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: i (Namespace: default).
> Source context: unavailable
> 	[ERROR] Unsupported element encountered: b (Namespace: default).
> Source context: unavailable
> 	[ERROR] Error in column-width property value '3.46cm
> ': org.apache.fop.fo.expr.PropertyException: No conversion defined
> 	[ERROR] Error in column-width property value '3.46cm
> ': org.apache.fop.fo.expr.PropertyException: No conversion defined
> 	[ERROR] Error in column-width property value '3.46cm
> ': org.apache.fop.fo.expr.PropertyException: No conversion defined
> 	[ERROR] Error in column-width property value '3.46cm
> ': org.apache.fop.fo.expr.PropertyException: No conversion defined
> 	[ERROR] Error in column-width property value '3.46cm
> ': org.apache.fop.fo.expr.PropertyException: No conversion defined
> 	[INFO] [1]
> 	[INFO] [1]
> 	[ERROR] no handler defined for urn:Correlagen:RightReport:CSection
> foreign xml
> 	[ERROR] At least one of minimum, optimum, or maximum IPD must be
> specified on table.
> 	[ERROR] java.lang.ClassCastException
>
> I've attached the files used in this processing.  Please, anything you can
> tell me to get this figured out would be greatly appreciated!!
>
>  <<06000003_TEST,HOLD_640.xml>>  <<ClientInfo.xml>>  <<AthenaFormat.xsl>>
 
> <<PrintFormat.xsl>> 
>
> Michael Gosselin
> Athena Diagnostics, Inc.
> (508) 756-2886 x3708
> (800) 394-4493 x3708
>
>
>   
> ------------------------------------------------------------------------
>
> The original MIME headers for this attachment are:
> Content-Type: text/plain; charset=us-ascii
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message