You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by cferrero <cr...@hotmail.com> on 2008/04/16 19:54:28 UTC

PERFORMANCE

Hi everybody.. im new with xml - xsl  and i 'm having performance problems in
converting xml - pdf.
I'm using antennahouse formatter to convert xml + xsl -> pdf i using xalan 
processor.

1)I read that using xsl compiled is the best way to get better performance,
but i have problems to compile when i try to do it this is message error :

Location of error unknown)XSLT Error (java.lang.IllegalAccessError): class
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2.AncestorIterator cannot access its
superclas
s org.apache.xml.dtm.ref.DTMDefaultBaseIterators$InternalAxisIteratorBase

i tried from command line and from java :

	String key = "javax.xml.transform.TransformerFactory";
		String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl";
		Properties props = System.getProperties();
		props.put(key, value);
		System.setProperties(props);

		// 1. Crear un TransformerFactory.
		TransformerFactory tFactory = TransformerFactory.newInstance();
		javax.xml.transform.Transformer transformer;
		tFactory.setAttribute("generate-translet", Boolean.TRUE);
		tFactory.setAttribute("auto-translet", Boolean.TRUE);
		tFactory.setAttribute("destination-directory", "translets");

		// 2. Usar el TransformerFactory para procesar la XSL
		// y generar el transformador.
		transformer = tFactory.newTransformer(new StreamSource(args [1])); //xsl

		File tempFo=null;
		tempFo=File.createTempFile("temp_",".fo");
		fosFo = new FileOutputStream(tempFo);
		fosPdf = new FileOutputStream(args[2]);
		
		
		// 3.Usar el transformador para procesar el origen de datos XML
		// y obtener el resultado de la transformación
		transformer.transform(new StreamSource(args [0]), //XML
				new StreamResult(new FileOutputStream("temp_.fo")));

2) if i don't use compiled xsl....the ransformations are no so fast. my xml
is about 13k and my xsl 64 k .for about 10.000 conversions :45 minutes and
the processor 99% !!!!!. i have a sun with 8 processors and 12 gb ram..could
i go better with this times ??? at list processor couldnt be so busy !!!


3) I suspect that maybe my xsl file can be optimized...im new with this

i attach my xsl & xml....i will receive all the advices to increase my
performance...really thanks everybody1pag.xml91.xsl
http://www.nabble.com/file/p16726856/91.xsl 91.xsl 
http://www.nabble.com/file/p16726856/1pag.xml 1pag.xml 
-- 
View this message in context: http://www.nabble.com/PERFORMANCE-tp16726856p16726856.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.


Re: PERFORMANCE

Posted by Henry Zongaro <zo...@ca.ibm.com>.
Hi, Cristian.

cferrero <cr...@hotmail.com> wrote on 2008-04-16 01:54:28 PM:
> 1)I read that using xsl compiled is the best way to get better 
performance,
> but i have problems to compile when i try to do it this is message error 
:
> 
> Location of error unknown)XSLT Error (java.lang.IllegalAccessError): 
class
> org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2.AncestorIterator cannot access 
its
> superclas
> s 
org.apache.xml.dtm.ref.DTMDefaultBaseIterators$InternalAxisIteratorBase

The usual reason for this error is that you have an older version of 
Xalan-J that's included as part of the Java run-time that is incompatible 
with a version that you have on your class path.  See this FAQ entry [1] 
for information about resolving this problem.  I hope that helps.

Thanks,

Henry
[1] http://xml.apache.org/xalan-j/faq.html#jdk14
------------------------------------------------------------------
Henry Zongaro
XML Transformation & Query Development
IBM Toronto Lab   T/L 313-6044;  Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com