  | |  | How to use XSL-FOP-Java together | How to use XSL-FOP-Java together 2003-12-29 - By "Crist?bal Ruiz, Oscar"
Back That doesnt solve the problem, I actually tried that before. I like this techonolgy, XSL-FOP. The problem is that I cannot get the simplest example running. Can somebody provides me with the simplest xsl-fo and xml files? Or just help me with my very simple example. I really think I am missing some important tag...
-- --Mensaje original-- -- De: Lerias, Hugo [mailto:hlerias@(protected)] Enviado el: lunes, 29 de diciembre de 2003 12:18 Para: 'fop-user@(protected)' Asunto: RE: How to use XSL-FOP-Java together
Hi Oscar,
I can't really tell what the problem might be.But it looks like it's a problem with the xml file.
One thing I see in your file is: you use a ' instead of " on the tag <?xml version = '1.0'?>.
Try with <?xml version = "1.0"?> maybe that's it.
Cheers, __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ Hugo L?rias Solution Architect Akamai Technologies GmbH Mail: hlerias@(protected) Succeed with Akamai EdgeComputing: http://www.akamai.com/en/html/services/edgecomputing.html __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______ About Akamai Akamai provides products and services that enable the world's leading enterprises and government agencies to extend and control their e-business infrastructure. Having deployed the world's largest, globally-distributed computing platform, Akamai ensures the highest levels of availability, reliability, security, and performance of networked information and applications delivery between the origin and the destination of any e-business process. Headquartered in Cambridge, Massachusetts, with research and development centers around the world, Akamai's industry-leading products and services, matched with world-class customer care, are used by hundreds of successful enterprises, government entities, and Web businesses around the globe. For more information, visit www.akamai.com. __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______
-- --Original Message-- -- From: "Crist?bal Ruiz, Oscar" [mailto:ocristobal@(protected)] Sent: Montag, 29. Dezember 2003 12:11 To: fop-user@(protected) Subject: How to use XSL-FOP-Java together
Hi there. I dont get to tranform directly from XML to a PDF file. I tried to execute the simplest example... but I cannot do it. I get this exception: Content is not allowed in prolog. What is the meaning of that?
Thanks in advance.
My xsl file is: ******************************************* <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output indent="yes"/>
<xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set> <fo:simple-page-master master-name="only"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set>
<fo:page-sequence master-reference="only">
<fo:flow flow-name="xsl-region-body"> <xsl:apply-templates select="//ATOM"/> </fo:flow>
</fo:page-sequence>
</fo:root> </xsl:template>
<xsl:template match="ATOM"> <fo:block font-size="20pt" font-family="serif" line-height="30pt"> <xsl:value-of select="NAME"/> </fo:block> </xsl:template>
</xsl:stylesheet> *******************************************
My xml file is: ******************************************* <?xml version = '1.0'?> <ATOM> <NAME> Plata </NAME> </ATOM> *******************************************
I receive the next stack trace: ******************************** javax.xml.transform.TransformerException : org.xml.sax.SAXParseException : Content is not allowed in prolog. at org.apache.xalan.transformer.TransformerImpl (TransformerImpl.java: 686) at org.apache.xalan.transformer.TransformerImpl (TransformerImpl.java: 1088) at org.apache.xalan.transformer.TransformerImpl (TransformerImpl.java: 1066) at reporte.processor.Procesador.XML2PDF(Procesador.java:132) at reporte.Marco1.jButton1_actionPerformed(Marco1.java:83) at reporte.Marco1_jButton1_actionAdapter.actionPerformed(Marco1.java:124) at javax.swing.AbstractButton (AbstractButton.java:1764) at javax.swing.AbstractButton $ForwardActionEvents.actionPerformed(AbstractButto n.java:1817) at javax.swing.DefaultButtonModel (DefaultButtonModel.java:4 19) at javax.swing.DefaultButtonModel (DefaultButtonModel.java:257) at javax.swing.plaf.basic.BasicButtonListener (BasicButtonListener .java:245) at java.awt.Component (Component.java:5134) at java.awt.Component (Component.java:4931) at java.awt.Container (Container.java:1566) at java.awt.Component (Component.java:3639) at java.awt.Container (Container.java:1623) at java.awt.Component (Component.java:3480) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095) at java.awt.Container (Container.java:1609) at java.awt.Window (Window.java:1590) at java.awt.Component (Component.java:3480) at java.awt.EventQueue (EventQueue.java:450) at java.awt.EventDispatchThread (EventDispatchThread.ja va:197) at java.awt.EventDispatchThread (EventDispatchThread.java :150) at java.awt.EventDispatchThread (EventDispatchThread.java:144) at java.awt.EventDispatchThread (EventDispatchThread.java:136) at java.awt.EventDispatchThread (EventDispatchThread.java:99) Caused by: org.xml.sax.SAXParseException : Content is not allowed in prolog. at org.apache.xerces.parsers.AbstractSAXParser (Unknown Source) at org.apache.xml.dtm.ref.DTMManagerDefault (DTMManagerDefault.java:349) at org.apache.xalan.transformer.TransformerImpl (TransformerImpl.java: 630) ... 28 more -- ------ org.xml.sax.SAXParseException : Content is not allowed in prolog. at org.apache.xerces.parsers.AbstractSAXParser (Unknown Source) at org.apache.xml.dtm.ref.DTMManagerDefault (DTMManagerDefault.java:349) at org.apache.xalan.transformer.TransformerImpl (TransformerImpl.java: 630) at org.apache.xalan.transformer.TransformerImpl (TransformerImpl.java: 1088) at org.apache.xalan.transformer.TransformerImpl (TransformerImpl.java: 1066) at reporte.processor.Procesador.XML2PDF(Procesador.java:132) at reporte.Marco1.jButton1_actionPerformed(Marco1.java:83) at reporte.Marco1_jButton1_actionAdapter.actionPerformed(Marco1.java:124) at javax.swing.AbstractButton (AbstractButton.java:1764) at javax.swing.AbstractButton $ForwardActionEvents.actionPerformed(AbstractButto n.java:1817) at javax.swing.DefaultButtonModel (DefaultButtonModel.java:4 19) at javax.swing.DefaultButtonModel (DefaultButtonModel.java:257) at javax.swing.plaf.basic.BasicButtonListener (BasicButtonListener .java:245) at java.awt.Component (Component.java:5134) at java.awt.Component (Component.java:4931) at java.awt.Container (Container.java:1566) at java.awt.Component (Component.java:3639) at java.awt.Container (Container.java:1623) at java.awt.Component (Component.java:3480) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095) at java.awt.Container (Container.java:1609) at java.awt.Window (Window.java:1590) at java.awt.Component (Component.java:3480) at java.awt.EventQueue (EventQueue.java:450) at java.awt.EventDispatchThread (EventDispatchThread.ja va:197) at java.awt.EventDispatchThread (EventDispatchThread.java :150) at java.awt.EventDispatchThread (EventDispatchThread.java:144) at java.awt.EventDispatchThread (EventDispatchThread.java:136) at java.awt.EventDispatchThread (EventDispatchThread.java:99) ********************************
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: fop-user-unsubscribe@(protected) For additional commands, e-mail: fop-user-help@(protected)
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: fop-user-unsubscribe@(protected) For additional commands, e-mail: fop-user-help@(protected)
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: fop-user-unsubscribe@(protected) For additional commands, e-mail: fop-user-help@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |