From: COUTHURES A. <ala...@ag...> - 2009-11-05 09:01:25
|
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 ? > > 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. > > 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!). Best regards, -Alain |