Ok, thank you again for your answer. Indeed, you've right. I've tried with new code without forgetting the root element and I could generate a pdf.
Yes, I understand, it was just for understanding the message error that I wrote to you. Thank you so much for helping me. Good day, Yours sincerely, Mlle André -----Message d'origine----- De : Hussein Shafie [mailto:[email protected]] Envoyé : mardi 28 avril 2015 10:04 À : ANDRE Marie-Agnes Cc : [email protected] Objet : Re: [XFC] XMLmind XSL Utility 4.3.2, message d'erreur (now, 5.2.0) My diagnostic was correct. The problem comes from your Essai_ts.xsl. If you use it to generate the FO file as follows (that is, outside our product XMLmind XSL Utility): --- java -cp ~/src/6xxe/bin/saxon.jar com.icl.saxon.StyleSheet \ -o Essai_ts.fo Essai_ts.xml Essai_ts.xsl --- It gives a FO file starting with plain text. Hence the "Content is not allowed in prolog" reported by FOP when doing the same but this time inside XMLmind XSL Utility. See attached Essai_ts.fo. In fact your XSLT stylesheet seems to contain several *design* errors (but no syntax errors). Please understand that helping you develop an XSLT stylesheet is completely out of the scope of this mailing list. On 04/28/2015 09:17 AM, ANDRE Marie-Agnes wrote: > Dear M. Hussein Shafie, > > It's ok in English. > Thank you for your answer. > > Yes, that's a long time since using the software. So, I've done it again in a > most recent version (5.2.0) and here is the message I have: > Converting "C:\Users\mandre\Documents\w_essais\projet_crea_xml\Essai_ts.xml" > to "C:\Users\mandre\Documents\w_essais\projet_crea_xml\Essai_ts.pdf" using > conversion specification "ts-test"... > Compiling XSLT stylesheet > "C:\Users\mandre\Documents\w_essais\projet_crea_xml\Essai_ts.xsl"... > XSLT stylesheet compiled in 0.687s. > Transforming > "C:\Users\mandre\Documents\w_essais\projet_crea_xml\Essai_ts.xml" to > "C:\Users\mandre\Documents\w_essais\projet_crea_xml\xslu6566132020306693465.tmp" > using XSLT stylesheet > "C:\Users\mandre\Documents\w_essais\projet_crea_xml\Essai_ts.xsl"... > XSLT transformation completed in 0.078s. > Converting > "C:\Users\mandre\Documents\w_essais\projet_crea_xml\xslu6566132020306693465.tmp" > to "C:\Users\mandre\Documents\w_essais\projet_crea_xml\Essai_ts.pdf" using > XSL-FO processor "FOP"... > javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: > Content is not allowed in prolog. > +--------------------------------------- > | com.icl.saxon.IdentityTransformer.transform(IdentityTransformer.java > | :61) > | com.xmlmind.xmleditext.fop1_foprocessor.FOP.doProcessFO(FOP.java:125 > | ) > | com.xmlmind.xmleditext.fop1_foprocessor.FOP.processFO(FOP.java:82) > | com.xmlmind.xslutil.ConvertTask.processFO(ConvertTask.java:1000) > | com.xmlmind.xslutil.ConvertTask.doRun2(ConvertTask.java:551) > | com.xmlmind.xslutil.ConvertTask.doRun(ConvertTask.java:135) > | com.xmlmind.xslutil.ConvertTask.run(ConvertTask.java:112) > | java.lang.Thread.run(Unknown Source) > +--------------------------------------- > CAUSE: > org.xml.sax.SAXParseException: Content is not allowed in prolog. > +--------------------------------------- > | org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > | org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > | Source) > | com.icl.saxon.IdentityTransformer.transform(IdentityTransformer.java > | :59) > | com.xmlmind.xmleditext.fop1_foprocessor.FOP.doProcessFO(FOP.java:125 > | ) > | com.xmlmind.xmleditext.fop1_foprocessor.FOP.processFO(FOP.java:82) > | com.xmlmind.xslutil.ConvertTask.processFO(ConvertTask.java:1000) > | com.xmlmind.xslutil.ConvertTask.doRun2(ConvertTask.java:551) > | com.xmlmind.xslutil.ConvertTask.doRun(ConvertTask.java:135) > | com.xmlmind.xslutil.ConvertTask.run(ConvertTask.java:112) > | java.lang.Thread.run(Unknown Source) > +--------------------------------------- > > Please find enclosed drafts of the xml and xsl files to help understand where > is the mistake. It's been a long time without doing a completely new xsl > stylesheet, so it can explain I forget things. > Thanks again. > > Regards, > > Mlle André > > > -----Message d'origine----- > De : Hussein Shafie [mailto:[email protected]] Envoyé : lundi 27 > avril 2015 16:52 À : ANDRE Marie-Agnes Cc : [email protected] > Objet : Re: [XFC] XMLmind XSL Utility 4.3.2, message d'erreur > > On 04/27/2015 11:46 AM, ANDRE Marie-Agnes wrote: >> >> Je travaille sur un projet pour convertir un fichier xml en pdf en >> utilisant une feuille de transformation en xsl-fo. >> >> Je viens que de débuter cette dernière. >> >> Quand je compile dans le logiciel. Il bloque une fois qu'il arrive à >> la partie FO, j'ai un message d'erreur : >> >> « org.xml.sax.SAXParseException: Content is not allowed in prolog. » >> >> J'ai vérifié mon prologue et je ne vois pas où est le problème. >> >> Code incluant la balise racine : >> >> <?xml version="1.1" encoding="iso-8859-1"?> >> >> <!DOCTYPE xsl:stylesheet [ >> >> <!ENTITY nbsp " "> >> >> ]> >> >> <xsl:stylesheet version="1.0" >> xmlns:fo="http://www.w3.org/1999/XSL/Format" >> >> >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> >> >> xmlns:java="http://xml.apache.org/xslt/java"> >> >> Avez-vous une idée pour savoir ce qui me bloque et m'empêche de continuer ? >> > > Sorry but this public, moderated, mailing-list is in English. > > > > --> It's hard to help you because > 1) XMLmind XSL Utility 4.3.2 is a very old version of our software and > as such, no longer supported by us; > 2) you give us very few details about the issue. > > --- > Quand je compile dans le logiciel. Il bloque une fois qu'il arrive à la > partie FO, j'ai un message d'erreur : > ... > --- > > --- > When I compile in the software. It hangs when it reaches the FO part, I have > a error message: > ... > --- > > is not precise enough. > > Please select the whole contents of XMLmind XSL Utility ``internal console'' > (what's below button "Convert"), use Ctrl-C to copy it to the clipboard and > then send us all the messages printed there by our tool. > > > > > --> You copied in your email just the very beginning of your XSLT > stylesheet. These few lines are OK. However the error you have probably comes > from the *body* of your XSLT stylesheet. > > Let's suppose your input document (that is, the document you want to convert > to PDF; not your XSLT stylesheet) contains: > > <my:doc xmlns:my="http://EDQM.eu/ns/my"> ... > </my:doc> > > If your XSLT stylesheet does *not* have a template which matches root element > my:doc, then the FO file it generates may contain plain text (due to default > XSLT templates) and hence you'll get "Content is not allowed in prolog". > > In a nutshell, the problem almost certainly comes from your XSLT stylesheet > and/or from a mismatch between your XSLT stylesheet and your input document. -- XMLmind FO Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xfc-support

