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 "&#160;">

                  ]>

                  <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.

<?xml version="1.0" encoding="utf-8"?>
	
		Guide 
		Chapter 5
		C mo
		
		
		
	
	
	
		<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e23">1. Whole B. components</fo:block>
		
			Whole B.
			
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e33">1.1 Definition and properties</fo:block>
				
					
						Whole B. is blood ...
					
						Whole B. for ...
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e51">1.1 Preparation</fo:block>
				
					
						By definition, ... of Whole B..
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e63">1.1 Requirements</fo:block>
				
					 lists the requirements. ...
					
						Table 5A-1
						
							
								Parameter
								Requirements
								Frequency 
							
						
						
							
								ABO
								Grouping
								All units
							
							
								Anti
								Negative
								All units
							
							
								H
								Negative
								All units
							
							
								Anti
								Negative 
								All units
							
							
								Volume
								450 mL ± 50 mL volume
									 A non-standard 
								1 per cent 
							
							
								Ha
								Minimum 45 g 
								4 units
							
							
								Hae
								&lt; 0.8 per cent s
								4 units 
							
						
						
						
							
								If different from ‘All units’, 
							
						
					
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e192">1.1 Storage </fo:block>
				
					
						Whole B. for ...
					
						Whole B. for preparation ... from Whole B..
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e213">1.1 Labelling</fo:block>
				
					The labelling must ...
					 identification;
					identity number;
					administration set.
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e231">1.1 Warnings</fo:block>
				
					Compatibility of Whole B. for .
					RhD
					metabolic;
					transfusion;
					iron.
				
			
			Whole B.
			
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e261">1.2 Definition </fo:block>
				
					
						Whole B., Leu... Whole B. by ...
					
						Whole B., LD contains.
					
						Whole B., LD normally contains less than 1.0 × 106
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e299">1.2 Preparation</fo:block>
				
					Generally ...
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e308">1.2 Requirements</fo:block>
				
					(see also Chapter 9).
					
						Table 5A-2
						
							
								Parameter
								Requirements
								Frequency of control
							
						
						
							
								ABO
								Grouping
								All units
							
							
								Anti
								Negative
								All units
							
							
								HB
								Negative 
								All units
							
							
								Anti
								Negative 
								All units
							
							
								Volume
								450 ± 50 mL
									A non-standard 
								1 per cent 
							
							
								Hae
								Minimum 
								1 per cent h
							
							
								Residual
								&lt; 1 × 106 per unit by count
								1 per cent 
							
							
								Hae
								&lt; 0.8 per cent 
								4 units per mont
							
						
						
						
							
								If different ...
								These requirements ..d.
							
						
					
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e455">1.2 Storage </fo:block>
				
					
						Whole B., LD must ...
					Validated ...
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e473">1.2 Labelling</fo:block>
				
					The labelling:
					
					the producer’s;
					the unique;
					the name ;
					administration set.
				
				<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e494">1.2 Warnings</fo:block>
				
					Compatibility of Whole B., LD with ...
					RhD...
					Whole B., 
					LD is 
					hae;
					non-hae;

					iron.
				
			
		
		<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e533">1. Red </fo:block>
		
			
			<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; id="d0e541">1.1 Definition </fo:block>
				
					
						Whole B. is ...
					
						Whole B. for ...
				
			
		
		
	
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to