Re: [Xsltforms-support] XSLTForms browsers compatibility + Some issues using XSLTForms in server si
Brought to you by:
alain-couthures
From: Javier D. <jd...@ge...> - 2009-11-05 08:30:55
|
Hello Alain, activating debug mode in xslt compilation, this error appeared: com.sun.org.apache.bcel.internal.generic.ClassGenException: ICONST can be used only for value between -1 and 5: 7 at com.sun.org.apache.bcel.internal.generic.ICONST.<init>(ICONST.java:81) at com.sun.org.apache.xalan.internal.xsltc.compiler.Step.translatePredicates(Step.java:412) at com.sun.org.apache.xalan.internal.xsltc.compiler.Step.translate(Step.java:237) at com.sun.org.apache.xalan.internal.xsltc.compiler.AbsoluteLocationPath.translate(AbsoluteLocationPath.java:101) at com.sun.org.apache.xalan.internal.xsltc.compiler.CastExpr.translate(CastExpr.java:229) at com.sun.org.apache.xalan.internal.xsltc.compiler.FunctionCall.translate(FunctionCall.java:710) Then, I tried to simplify the processing-instruction commands, using an extra variable and it seems that Xalan can process the xsl and it seems it works ok. 25,26c25 < <xsl:variable name="pivaluebck" select="/processing-instruction('xml-stylesheet')"/> < <xsl:variable name="pivalue" select="translate(normalize-space($pivaluebck[1]), ' ', '')"/> --- > <xsl:variable name="pivalue" select="translate(normalize-space(/processing-instruction('xml-stylesheet')[1]), ' ', '')"/> ¿Is it possible to make a change in xsltforms xsl like this to al the proccessing-instruction lines to be able to use it with Xalan? In addition, I have seen that you have some processing-instruction lines duplicated (css-conversion and xsltforms-options ones). Taking in account that the processing instructions you have are global, and are located in the top of xml document if defined, maybe is better to retrieve its value at the beginning of the document (I completely ignore if this can affect to your xsl, it is only a suggestion). Best Regards, Javier COUTHURES Alain escribió: > Hello Javier, >> But using baseuri, if I leave uncommented the first >> processing-instruction, I get when loading the xsl: >> >> javax.xml.transform.TransformerConfigurationException: No se ha >> podido compilar la hoja de estilos >> at >> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:825) >> >> (No se ha podido compilar la hoja de estilos in spanish means that it >> wasn't possible to compile the stylesheet) >> >> The code that is failing is (only fails when we have the processing >> instructions): >> >> Templates template = null; >> if( file != null ) >> { >> Source xslSource = new >> StreamSource (new File(GRMEntorno.PATH_XSL + GRMEntorno.SEP + file) ); >> TransformerFactory tFactory = >> TransformerFactory.newInstance(); >> *template = >> tFactory.newTemplates( xslSource );* >> } > It sounds like a Xalan problem... Did you already have a look at posts > concerning similar problems : > http://stackoverflow.com/questions/1235121/java-problem-loading-stylesheet > , http://dev.eclipse.org/newslists/news.eclipse.webtools/msg18031.html ? > > Best regards, > > -Alain |