Re: [css2xslfo-support] producing empty FO output
Brought to you by:
wdonne
From: <aro...@cl...> - 2008-10-17 14:25:43
|
Thank you Werner, That's a very nice offer. Unfortunately I spoke with management and they'd prefer I don't get into this right now and want me to move in a different direction. I'm sorry. Maybe later I'll write back and you can help us debug the issue. Again, thanks for your generosity and I'm sorry I can't send you the sample files at this time. -- Aaron Werner Donné <wer...@re...> wrote on 17-10-2008 03:20:34 AM: > Hi Aaron, > > That is probably a bug. Can you send the original document with the > style sheets in a ZIP to su...@re...? You can also add a PDF from > one of the other tools, so I can see what should be produced. > > Best regards, > > Werner. > > On 16 Oct 2008, at 18:54, aro...@cl... wrote: > > > > > Wow! thanks Werner, Brad, and Sergey. You are all very responsive. > > > > I'm getting a little further now after adding: > > > > visits > > { > > region: body; > > } > > > > unfortunately, I get a type of null pointer exception. Do I need to > > define some other specifier since this is a pure XML document > > without the XHTML trimmings? > > > > Thanks, > > -- Aaron > > > > Here's the stack trace: > > > > null > > be.re.css.CSSToXSLFOException > > at be.re.css.CSSToXSLFO.convert(CSSToXSLFO.java:138) > > at be.re.css.CSSToXSLFO.main(CSSToXSLFO.java:267) > > Caused by: > > java.util.EmptyStackException > > at > > com.sun.org.apache.xml.internal.utils.IntStack.peek(IntStack.java:125) > > at > > com > > .sun > > .org > > .apache > > .xml.internal.dtm.ref.sax2dtm.SAX2DTM2.endElement(SAX2DTM2.java:2239) > > at > > com > > .sun > > .org.apache.xalan.internal.xsltc.dom.SAXImpl.endElement(SAXImpl.java: > > 936) > > at > > com > > .sun > > .org > > .apache > > .xalan > > .internal > > .xsltc > > .trax.TransformerHandlerImpl.endElement(TransformerHandlerImpl.java: > > 273) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at be.re.css.PageSetupFilter.endElement(PageSetupFilter.java: > > 315) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > be.re.css.BlockContainerFilter.endElement(BlockContainerFilter.java: > > 72) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at be.re.css.FootnoteFilter.endElement(FootnoteFilter.java:68) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at be.re.css.LinkFilter.endElement(LinkFilter.java:51) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > be > > .re.css.WidthAndMarginsFilter.endElement(WidthAndMarginsFilter.java: > > 159) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at be.re.css.CenterFilter.endElement(CenterFilter.java:94) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > be.re.css.NormalizeTableFilter.endElement(NormalizeTableFilter.java: > > 190) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > be > > .re > > .css > > .XHTMLAttributeTranslationFilter > > .endElement(XHTMLAttributeTranslationFilter.java:272) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at be.re.css.ForeignFilter.endElement(ForeignFilter.java:48) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > be > > .re.css.DisplayNonePropagator.endElement(DisplayNonePropagator.java: > > 45) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at be.re.css.WrapperFilter.endElement(WrapperFilter.java:45) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at be.re.css.FOMarkerFilter.endElement(FOMarkerFilter.java:98) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at be.re.css.ProjectorFilter.endElement(ProjectorFilter.java: > > 439) > > at > > org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:546) > > at > > com > > .sun > > .org > > .apache > > .xerces > > .internal > > .parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) > > at > > com > > .sun > > .org > > .apache > > .xerces > > .internal > > .impl > > .XMLNSDocumentScannerImpl > > .scanEndElement(XMLNSDocumentScannerImpl.java:719) > > at > > com > > .sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl > > $ > > FragmentContentDispatcher > > .dispatch(XMLDocumentFragmentScannerImpl.java:1685) > > at > > com > > .sun > > .org > > .apache > > .xerces > > .internal > > .impl > > .XMLDocumentFragmentScannerImpl > > .scanDocument(XMLDocumentFragmentScannerImpl.java:368) > > at > > com > > .sun > > .org > > .apache > > .xerces > > .internal.parsers.XML11Configuration.parse(XML11Configuration.java: > > 834) > > at > > com > > .sun > > .org > > .apache > > .xerces > > .internal.parsers.XML11Configuration.parse(XML11Configuration.java: > > 764) > > at > > com > > .sun > > .org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java: > > 148) > > at > > com > > .sun > > .org > > .apache > > .xerces > > .internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) > > at > > be > > .re > > .xml > > .sax.ProtectEventHandlerFilter.parse(ProtectEventHandlerFilter.java: > > 56) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at be.re.xml.sax.FilterOfFilters.parse(FilterOfFilters.java: > > 165) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at > > org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > > at be.re.xml.sax.FilterOfFilters.parse(FilterOfFilters.java: > > 165) > > at be.re.css.CSSToXSLFOFilter.parse(CSSToXSLFOFilter.java:324) > > at be.re.css.CSSToXSLFO.convert(CSSToXSLFO.java:133) > > at be.re.css.CSSToXSLFO.main(CSSToXSLFO.java:267) > > > > Werner Donné <wer...@re...> wrote on 16-10-2008 03:39:48 AM: > > > > > Hi Aaron, > > > > > > If you add the following rule for the "visits" element it should > > work: > > > > > > visits > > > { > > > region: body; > > > } > > > > > > The notion of having regions stems from the fact that an XSL-FO > > document > > > is made up of regions and page sequences. For each new page sequence > > > I have to regenerate stuff starting from the element that > > represents the > > > body region. > > > > > > I understand you are annoyed by that. It is, however, not so easy to > > > choose a default body region. At first sight the document element > > would > > > be a good candidate, but some XML languages define some > > preliminary meta > > > information. As a consequence, a lower element may have to be the > > body > > > region. I could scan the CSS files to check if some element > > already has > > > been assigned as the body region and use the document element if > > there > > > isn't one. However, it is not certain the rule would apply to any > > > element > > > at all and moreover, the "style" attribute could have been used > > inside > > > the > > > document to assign the body region. In order to solve this I would > > have > > > to examine the complete document first. This is not possible, > > because > > > the > > > tool works as a streaming filter. That is to reduce memory > > consumption > > > for very large documents. > > > > > > Best regards, > > > > > > Werner. > > > > > > On 15 Oct 2008, at 20:48, aro...@cl... wrote: > > > > > > > > > > > Hi, > > > > > > > > I'm just getting started trying to use css2xslfo. At the moment, I > > > > just want to see it produce an FO document but I'm getting a file > > > > with zero bytes. > > > > > > > > I tried the following: > > > > > > > > java -Dbe.re.stack -jar css2xslfo1_6.jar visitDump.xml -fo > > > > visitDump.fo > > > > > > > > I don't get any warnings of any sort. It chugs away but then > > creates > > > > an empty "visitDump.fo" file. > > > > > > > > The xml source file is not xhtml, just pure xml. It looks > > something > > > > like so: > > > > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > <?xml-stylesheet href="visitDump.css" type="text/css" > > media="all"?> > > > > <visits> > > > > <protocol> > > > > <protocol_descriptor>Hello</protocol_descriptor> > > > > ... > > > > </protocol> > > > > ... > > > > </visits> > > > > > > > > Ultimately I'd like to connect it to FOP to produce a PDF but > > right > > > > now, I'm not able to get it to do the FO part yet. Any ideas on > > what > > > > I might be missing? > > > > > > > > Thanks in advance, > > > > -- > > > > Aaron > > > > > > ------------------------------------------------------------------------- > > > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > > > challenge > > > > Build the coolest Linux based applications with Moblin SDK & win > > > > great prizes > > > > Grand prize is a trip for two to an Open Source event anywhere in > > > > the world > > > > http://moblin-contest.org/redirect.php? > > > banner_id=100&url=/_______________________________________________ > > > > css2xslfo-support mailing list > > > > css...@li... > > > > https://lists.sourceforge.net/lists/listinfo/css2xslfo-support > > > > > > -- > > > Werner Donné -- Re http://www. > > > pincette.biz > > > Engelbeekstraat 8 > > > http://www.re.be > > > BE-3300 Tienen > > > tel: (+32) 486 425803 e-mail: wer...@re... > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > Build the coolest Linux based applications with Moblin SDK & win > > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > > the world > > http://moblin-contest.org/redirect.php? > banner_id=100&url=/_______________________________________________ > > css2xslfo-support mailing list > > css...@li... > > https://lists.sourceforge.net/lists/listinfo/css2xslfo-support > > -- > Werner Donné -- Re http://www. > pincette.biz > Engelbeekstraat 8 > http://www.re.be > BE-3300 Tienen > tel: (+32) 486 425803 e-mail: wer...@re... > > > > > |