Re: stykesheet attribute version
the problem is solved, i dunno what changed or what happen, i just rebuild all my jars and now it works same xml, same xsl etc... weird shite :D thx all for helping Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information.
Re: stykesheet attribute version
[EMAIL PROTECTED] wrote: kbcs_fop.jar;batik.jar;avalonframework.jar;fop.jar;xalan.jar; >iText.jar;logkit1b4.jar;jaxp.jar;xerces.jar;. ^ Bad idea, remove it. Usually this jar contains ancient and outdated JAXP stuff which interferes with the correct code in xerces.jar. J.Pietschmann
Re: stykesheet attribute version
[EMAIL PROTECTED] wrote: Oleg, here is the file (copy and pasted it...) Looks good :( Debug your code and if the exception occurs in transForm = transFactory.newTransformer(new DOMSource ... try to ask on your xslt processor mail-list. -- Oleg Tkachenko Multiconn International Ltd, Israel
Re: stykesheet attribute version
i tried it again with both ways still get the exeption... but thanks anyway, and i'm sorry that i brought it up here, but you guyz are the only ones that really care and really help greets Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information.
Re: stykesheet attribute version
ok, i'll try one more time, but this really has little to do with FOP. Did you check the xalan-dev archive? http://marc.theaimsgroup.com/?l=xalan-dev Maybe the problem is in "setNamespaceAware" while(li.hasNext()){ try { String key = (String)li.next(); if (key.endsWith("_XSL")){ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); dbf.setNamespaceAware(true); Don't you have to switch these last 2 lines? Peter
Re: stykesheet attribute version
Oleg, here is the file (copy and pasted it...) thank you for your help http://www.w3.org/1999/XSL/Format"; xmlns:xsl="http://www.w3.org/1999/XSL/Transform";> http://www.w3.org/1999/XSL/Format";> ___ 1 Enkel schriftelijke reacties kunnen in aanmerking genomen worden. Brussels Amsterdam Madrid New York Paris KBC Securities N.V. BTW BE-437.060.521 Havenlaan 12 Handelsregister 626.457 B-1080 Brussel Rekening KBC Bank 409-6547401-42 Onze referte : ___
Re: stykesheet attribute version
Oleg, i get my whole xsl file bact printed out... (as good as i can see it...) if you want it i'll write the output to file... let me know Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information. Oleg TkachenkoTo: [EMAIL PROTECTED] <[EMAIL PROTECTED]cc: onn.com> Subject: Re: stykesheet attribute version 11/06/2002 16:51 Please respond to fop-user [EMAIL PROTECTED] wrote: > ok don't complain if it is a lot of code: Well, that was really not much, but too hard to grasp, so lets begin from another side: > public void process(Map props) throws ProcessException { >DOMResult res = null; >TransformerFactory transFactory; >Transformer transForm; >String language; >// XML Parsen en de preparatie van het document zodat de renderer >// de juiste gegevens heeft. >try{ >language = (String)props.get(languageKey); >transFactory = TransformerFactory.newInstance(); Lets serialize xsl doc at this point to see whether it's ok: Node xslDOM = (Node)TransformDocs.get(((String)props.get(languageKey)) + " _XSL"); Transformer idTransform = transFactory.newTransformer(); idTransform.transform(new DOMSource(xslDOM), new StreamResult(System.out)); And what is at the System.out after that ? -- Oleg Tkachenko Multiconn International Ltd, Israel
Re: stykesheet attribute version
[EMAIL PROTECTED] wrote: ok don't complain if it is a lot of code: Well, that was really not much, but too hard to grasp, so lets begin from another side: > public void process(Map props) throws ProcessException { >DOMResult res = null; >TransformerFactory transFactory; >Transformer transForm; >String language; >// XML Parsen en de preparatie van het document zodat de renderer >// de juiste gegevens heeft. >try{ >language = (String)props.get(languageKey); >transFactory = TransformerFactory.newInstance(); Lets serialize xsl doc at this point to see whether it's ok: Node xslDOM = (Node)TransformDocs.get(((String)props.get(languageKey)) + "_XSL"); Transformer idTransform = transFactory.newTransformer(); idTransform.transform(new DOMSource(xslDOM), new StreamResult(System.out)); And what is at the System.out after that ? -- Oleg Tkachenko Multiconn International Ltd, Israel
Re: stykesheet attribute version
hi Peter, I tried without it, but doesn't change a thing... still get the same error... and no worries, every help is help... and sometimes other peeps see more then you do after looking @ it for ages :-) greets Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information.
Re: stykesheet attribute version
ok don't complain if it is a lot of code: the Sequence.xml is also pasted inside public Processor(){ ResourceBundle sequence = ResourceBundle.getBundle("Sequence"); inFile = new File(sequence.getString("Sequence")); LoggerFactory.getLogger().log(this.getClass (),ILogger.LEVEL_DEBUG,"Initialisatie van de Processor\nSequenca file : " + inFile); init(); } public void init(){ try{ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance (); DocumentBuilder db = dbf.newDocumentBuilder(); Document DocSeq = db.parse(inFile); NodeList sequencesList = DocSeq.getDocumentElement ().getElementsByTagName("Sequences"); for(int a=0;a Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information. Oleg TkachenkoTo: [EMAIL PROTECTED] <[EMAIL PROTECTED]cc: onn.com> Subject: Re: stykesheet attribute version 11/06/2002 16:10 Please respond to fop-user [EMAIL PROTECTED] wrote: > "java -cp > kbcs_fop.jar;batik.jar;avalonframework.jar;fop.jar;xalan.jar;iText.jar;logkit1b4.jar;jaxp.jar;xerces.jar;. > > com.kbcsecurities.test.Startup" You didn't show us how you build in
Re: stykesheet attribute version
[EMAIL PROTECTED] wrote: Do you mean that there is no way around it? weird, i can run it from my workstation (same os etc only diff processor and less memory) can't be... The fact that it is logged in bugzilla does not imply it is a bug, in fact that one was tagged as invalid (see comment at bottom). But that comment doesn't help you much... > this is how i call my whole application > > "java -cp kbcs_fop.jar;batik.jar;avalonframework.jar;fop.jar;xalan.jar;iText.jar;logkit1b4.jar;jaxp.jar;xerces.jar;. > com.kbcsecurities.test.Startup" > That "jaxp.jar" looks suspicious to me, do you need it? Does it work if you remove it? I would think xerces and xalan is enough? I would bet there some problem in your classpath and the wrong XSLT-engine is called or so. (I am absolutely not an XML expert, just trying to help a bit... :-) Peter
RE: stykesheet attribute version
I think you should try this: http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format"; version="1.0"> note at the version attribute inside the xsl:stylesheet tag cu Torsten ps: > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Dienstag, 11. Juni 2002 14:50 > To: [EMAIL PROTECTED] > Subject: Re: stykesheet attribute version > > > > i showed the code in the first mail , and i do implement the > version in the > tag... > look below... > > > http://www.w3.org/1999/XSL/Transform"; xmlns:fo=" > http://www.w3.org/1999/XSL/Format";> > > --x SNIP
Re: stykesheet attribute version
[EMAIL PROTECTED] wrote: "java -cp kbcs_fop.jar;batik.jar;avalonframework.jar;fop.jar;xalan.jar;iText.jar;logkit1b4.jar;jaxp.jar;xerces.jar;. com.kbcsecurities.test.Startup" You didn't show us how you build initprops Map, please. public void process(Map props) throws ProcessException { DOMResult res = null; TransformerFactory transFactory; Transformer transForm; String language; // XML Parsen en de preparatie van het document zodat de renderer // de juiste gegevens heeft. try{ language = (String)props.get(languageKey); transFactory = TransformerFactory.newInstance(); At this point you can check whether (Node)TransformDocs.get(((String)props.get(languageKey)) + "_XSL") returns you valid stylesheet DOM document, e.g. try to serialize it and inspect. -- Oleg Tkachenko Multiconn International Ltd, Israel
Re: stykesheet attribute version
i showed the code in the first mail , and i do implement the version in the tag... look below... http://www.w3.org/1999/XSL/Transform"; xmlns:fo=" http://www.w3.org/1999/XSL/Format";> this is how i call my whole application "java -cp kbcs_fop.jar;batik.jar;avalonframework.jar;fop.jar;xalan.jar;iText.jar;logkit1b4.jar;jaxp.jar;xerces.jar;. com.kbcsecurities.test.Startup" under here is the process that gives the error (my application exists out off different processes because the application not only generates pdf's but also ini files, text files, xmlfiles etc...) First the init() is run then the process(), i'm sure i give the xsl file cause on my puter the code works (i generate the pdf's) but on the production server i get the error... i hope this helps you out more... /* * XSLFOTransformer.java * * Created on 17 May 2002, 09:50 */ package com.kbcsecurities.rendering.processes; import java.io.*; import java.util.*; import com.kbcsecurities.rendering.interfaces.*; import com.kbcsecurities.rendering.exceptions.*; import com.kbcsecurities.util.log.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.sax.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.w3c.dom.*; import org.xml.sax.*; import java.util.*; import java.io.*; import org.apache.log.*; import org.apache.fop.apps.*; import org.apache.fop.render.*; import org.apache.log.format.*; import org.apache.log.output.*; import org.apache.log.output.io.*; import org.apache.fop.fonts.apps.* ; /** * * @author U97488 */ public class XSLFOTransformer implements IProcess { String sourceKey, languageKey, targetKey; Map TransformDocs = new HashMap(); public void init(Map initprops) throws ProcessException { File inFile; ArrayList al = new ArrayList(); sourceKey = (String)initprops.get("sourceKey"); targetKey = (String)initprops.get("targetKey"); languageKey = (String)initprops.get("languageKey"); Set set = initprops.keySet(); Iterator li = set.iterator(); while(li.hasNext()){ try { String key = (String)li.next(); if (key.endsWith("_XSL")){ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); dbf.setNamespaceAware(true); inFile = new File((String)initprops.get(key)); Document XSLDoc = db.parse(inFile); TransformDocs.put(key, XSLDoc); System.out.println(key); } } catch(Exception e){ LoggerFactory.getLogger().log(this.getClass(), e, true); throw new ProcessException("MSG"); } } } public void process(Map props) throws ProcessException { DOMResult res = null; TransformerFactory transFactory; Transformer transForm; String language; // XML Parsen en de preparatie van het document zodat de renderer // de juiste gegevens heeft. try{ language = (String)props.get(languageKey); transFactory = TransformerFactory.newInstance(); transForm = transFactory.newTransformer(new DOMSource ((Node)TransformDocs.get(((String)props.get(languageKey)) + "_XSL"))); res = new DOMResult(); transForm.setOutputProperty("omit-xml-declaration", "yes"); // volgende lijn doet iet raar: // deze steekt in feite het getransformeerde document in res! // dus res is het resultaat en niet gewoon een argument dat je meegeeft!!! // desgeveolge steek ik later res in mijn map props en geef ik dit door aan // de fop transformer. transForm.transform(new DOMSource ((Node)props.get(sourceKey)),res); //in de map props steken. props.put(targetKey, (Document)res.getNode()); } catch (TransformerConfigurationException tce){ LoggerFactory.getLogger().log(this.getClass(), tce, true); tce.printStackTrace(); throw new ProcessException("MSG"); }catch (TransformerException te){ //parser heeft een fout gemaakt LoggerFactory.getLogger().log(this.getClass(), te, true); te.printStackTrace(); throw new ProcessException("MSG"); } catch (Exception ie) { LoggerFactory.getLogger().log(this.getClass(), ie, true); ie.printStackTrace(); throw new ProcessException("MSG"); } } } Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99
Re: stykesheet attribute version
[EMAIL PROTECTED] wrote: Do you mean that there is no way around it? weird, i can run it from my workstation (same os etc only diff processor and less memory) can't be... if someone knows how to resolve it i would really appreciate it... The exception means that xslt processor couldn't see version attribute in the xsl stylesheet. Make sure your xsl is ok and you are not trying to provide xml file instead of xsl stylesheet. If this doesn't help, show us what are you doing and how. -- Oleg Tkachenko Multiconn International Ltd, Israel
Re: stykesheet attribute version
Do you mean that there is no way around it? weird, i can run it from my workstation (same os etc only diff processor and less memory) can't be... if someone knows how to resolve it i would really appreciate it... Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information. Peter Jacobs <[EMAIL PROTECTED]To: [EMAIL PROTECTED] magie.com>cc: Subject: Re: stykesheet attribute version 11/06/2002 11:28 Please respond to fop-user [EMAIL PROTECTED] wrote: > anyway, i get the error: > java.xml.transform.TransformerConfigurationException: stylesheet requires > attribute: version... > > of course it is there, but still i get the error, i maved the version tag > in the attributes before and after each of the other attributes... but > still same error... looks like: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6813 sorry, is not really helpfull... Peter Jacobs Freelance multimedia programmeur De Budetstraat 8 B-3201 Aarschot [EMAIL PROTECTED] 016/573257
Re: stykesheet attribute version
[EMAIL PROTECTED] wrote: anyway, i get the error: java.xml.transform.TransformerConfigurationException: stylesheet requires attribute: version... of course it is there, but still i get the error, i maved the version tag in the attributes before and after each of the other attributes... but still same error... looks like: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6813 sorry, is not really helpfull... Peter Jacobs Freelance multimedia programmeur De Budetstraat 8 B-3201 Aarschot [EMAIL PROTECTED] 016/573257
Re: stykesheet attribute version
[EMAIL PROTECTED] wrote: i have an error, i've been searchin the marc.theaimsgroup.com archive for the solution, but can't really find it... i know it can be solved... anyway, i get the error: java.xml.transform.TransformerConfigurationException: stylesheet requires attribute: version... You probably muddled up xsl and xml documents. -- Oleg Tkachenko Multiconn International Ltd, Israel
stykesheet attribute version
hi guyz/gurlz i'm back :D i have an error, i've been searchin the marc.theaimsgroup.com archive for the solution, but can't really find it... i know it can be solved... anyway, i get the error: java.xml.transform.TransformerConfigurationException: stylesheet requires attribute: version... of course it is there, but still i get the error, i maved the version tag in the attributes before and after each of the other attributes... but still same error... I use the xalan and the xerces (but it's the xalan that gives an error) i had that error once but it resolved itself... now on my development enviroment i don't have the error but i use the same jars, same xsl's etc... but i get the error on the productionmachine please advise... Jochen Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information.