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 11:57:17
|
COUTHURES Alain escribió: > Hello Javier, >> 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) > It seems this exception is already known as a possible bug: > http://marc.info/?l=xalan-dev&m=117629991417675&w=2 > > Are you using the latest Xalan version ? I'm using the Xalan version that comes with the sun jvm. In my case, it is: $ java -server -version java version "1.6.0_15" Java(TM) SE Runtime Environment (build 1.6.0_15-b03) Java HotSpot(TM) Server VM (build 14.1-b02, mixed mode) It is one of the latest java 1.6 versions (the last is 1.6.17), so maybe is a different bug, I suppose the one you indicated is old enough to be solved. >> >> 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? > There are already workarounds in XSLTForms like the one you found for > other XSLT engines problems. So, I will change this in XSLTForms as > you suggest. I will contact you again when it will be committed. Many thanks :) I will try it as soon as you change it. >> >> 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). > Instead of global variables, I prefer having local variables defined > and used in the corresponding source component (if you have a look at > the SVN repository, you will see that the xsltforms.xsl file is > generated from many source components!). Oh, I didn't know you split the xsl in several pieces, a good idea if it gets too long :) > > Best regards, > > -Alain > |