"No adjustColumnWidths function available"
Added by Anonymous over 19 years ago
Legacy ID: #3286921 Legacy Poster: Brian O. (briano)
Saxon Help, I'm trying to get some basic Saxon processing going, perhaps you'll have some insights. I have a simple script that attempts to create HTML from Docbook XML. When I run my shell script I get that error message above, but after a fair amount of nice HTML is created. Some basic information : MacOSX 10.4, Darwin Kernel Version 8.2.0 Java version "1.4.2_07" What I've installed by hand into /usr/local : docbook-dsssl-1.79 docbook-xsl-1.69.0 jaxp-1_3-20050622 saxonb8-5 xalan-j_2_6_0 My CLASSPATH : CLASSPATH=.:/Library/Java/Home:/usr/local/saxonb8-5:/usr/local/docbook-xsl-1.69.0/extensions/xalan25.jar:/usr/local/saxonb8-5/saxon8.jar:/usr/local//xalan-j_2_6_0/bin/xalan.jar:/usr/local/jaxp-1_3-20050622:/usr/local/jaxp-1_3-20050622/xalan.jar My tcsh script: setenv STYLE_FILE '~/src/docbook/stylesheet/e-novative_article_html.xsl' setenv SAXON_JAR '/usr/local/saxonb8-5/saxon8.jar' setenv XML_FILE '~/bioperl-live/doc/howto/sgml/Beginners.xml' setenv JAVA_APP '/usr/bin/java' $JAVA_APP -jar $SAXON_JAR $XML_FILE $STYLE_FILE use.extensions=1 Yes, I've kind of overdone the CLASSPATH with 3 different xalan.jar's included. It's my understanding that the adjustColumnWidths is somewhere in some class in xalan.jar. I must be making some basic mistake somewhere, yes? Thanks again, Brian O.
Replies (5)
Please register to reply
RE: "No adjustColumnWidths function available - Added by Anonymous over 19 years ago
Legacy ID: #3287079 Legacy Poster: Michael Kay (mhkay)
It's a bit hard to help, because you haven't shown your stylesheet, you haven't provided the source of the adjustColumnWidths function, and you haven't provided any evidence that it's loadable from the classpath. Try the javap command with this classpath to see if a class containing this method can be located. Try -TJ on the Saxon command line to show what methods it is searching for and why it is rejecting the ones that it finds. Michael Kay
RE: "No adjustColumnWidths function available" - Added by Anonymous over 19 years ago
Legacy ID: #3287355 Legacy Poster: Brian O. (briano)
Michael, Very good, this is the sort of advice I need, very basic (I know very little about Java). So, javap is telling me that adjustColumnWidths is a public method in xalan.jar (and this exact path to xalan.jar was taken from my CLASSPATH) : >javap -classpath /usr/local/docbook-xsl-1.69.0/extensions/xalan25.jar -private com.nwalsh.xalan.Table Compiled from null public class com.nwalsh.xalan.Table extends java.lang.Object{ private static int pixelsPerInch; protected static java.util.Hashtable unitHash; protected static java.lang.String foURI; public com.nwalsh.xalan.Table(); protected static void initializeHash(); public static void setPixelsPerInch(int); public int getPixelsPerInch(); public static int convertLength(java.lang.String); public org.w3c.dom.DocumentFragment adjustColumnWidths(org.apache.xalan.extensions.ExpressionContext,org.w3c.dom.traversal.NodeIterator); private org.xml.sax.Attributes copyAttributes(org.w3c.dom.Element); protected java.lang.String[] correctRoundingError(java.lang.String[]); static {}; } I'll post again once I've found out more using -TJ... Thanks again, Brian O.
RE: "No adjustColumnWidths function available" - Added by Anonymous over 19 years ago
Legacy ID: #3288282 Legacy Poster: Brian O. (briano)
Michael, From the xalan-j site: JDK/JRE 1.4, and JDK/JRE 5.0 is packaged with an old version of Xalan-Java. The JDK/JRE will attempt to use this version instead of any on the classpath. Unfortunately, this causes problems when attempting to use a newer version of Xalan-Java. You can always determine which version of Xalan-Java you are running by using the EnvironmentCheck class or by using the xalan:checkEnvironment extension function. It is highly recommended that you use this method to verify the version of Xalan-Java you are running, especially before opening a bug report. To use a newer version of Xalan-Java and override the one packaged with the JDK: use the Endorsed Standards Override Mechanism. Place the xalan.jar, serializer.jar, xercesImpl.jar and xml-apis.jar in the <java-home>\lib\endorsed directory, where <java-home> is where the runtime software is installed. The following methods do not work: Using the CLASSPATH environment variable or using -classpath to place the new classes in the classpath. Using the -jar option to explicitly execute the classes inside the new jar files. Unfortunately when I instruct java to use my "endorsed" xalan.jar file I get a whole host of other errors. At this point it's wiser to move on to more productive tasks. Thanks again, Brian O.
RE: "No adjustColumnWidths function available" - Added by Anonymous over 19 years ago
Legacy ID: #3288451 Legacy Poster: Brian O. (briano)
Michael, Postscript: I've looked at the latest xalan code, the adjustColumnWidths method expects 2 arguments and the stylesheet I'm using gives one, even if I could load this class the method wouldn't work. Thanks for your help, Brian O,.
RE: "No adjustColumnWidths function available - Added by Anonymous over 19 years ago
Legacy ID: #3288616 Legacy Poster: Michael Kay (mhkay)
Since adjustColumnWidths requires an argument of type org.apache.xalan.extensions.ExpressionContext, it seems loikely that the method was written explicitly to work with Xalan and is therefore unlikely to work with Saxon. Check to see if Norm has written a version of the method designed to work with Saxon. Michael Kay
Please register to reply