When you run from the command line using the -jar option, no classes other than those in saxon9.jar will be loaded. The classpath is ignored.
With this configuration, use
java -cp saxon9.jar;CzechCollation.jar net.sf.saxon.Transform -t SelectedAuthors.xml Authors2.xsl > SortedAuthors.xml
Michael Kay

From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Mark Wilson
Sent: 16 July 2008 00:26
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] collation problem

Hello Michael,
Thanks for your answer. I did the following:
I changed the stylesheet to reflect some suggestions you made elsewhere:

<xsl:param name=" sorting-collation" select="'http://saxon.sf.net/collation?class=CzechCollation'" />

<xsl:sort select="Author" collation="{$sorting-collation}"/>

I moved the CzechCollation.jar, the xml input file and the xsl stylesheet all to my saxon directory and ran on the command line

java -jar saxon9.jar -t SelectedAuthors.xml Authors2.xsl > SortedAuthors.xml
The Errors simply said:
Loading net.sf.saxon.even.MessageEmmitter
Loading CzechCollation
No Java class CzechCollation could be loaded
Warning: failed to load CzechCollation
I tried three changes in the XSL stylesheet: CzechCollation, CzechCollarion.class and CzechColation.jar, but none helped.
I have been at this for two solid days and have learned a great deal but have not solved my problem.
I am not sure what a classpath is (my java is very weak). Could that be my problem? Did moving everything to the saxon directory help?

From: Michael Kay
Sent: Tuesday, July 15, 2008 3:36 PM
To: 'Mailing list for the SAXON XSLT and XQuery processor'
Subject: Re: [saxon] collation problem

I'm afraid I don't know the oXygen environment particularly well. The most likely explanation for this error is that the class could not be loaded, and the most likely reason for that is that the JAR isn't on the classpath.
The Saxon command line option -t gives better diagnostics when user-supplied classes can't be loaded. There should be some way of switching that on within oXygen, if not, please try running it from the command line.
The "failure to load Main-Class" is not a problem
Michael Kay

From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Mark Wilson
Sent: 15 July 2008 22:07
To: saxon-help@lists.sourceforge.net
Subject: [saxon] collation problem

I have read in the archive that to add my own collator to Oxygen, I must drop the jar file in the oxygen lib folder. I have done this, and still get the same error message:
F [Saxon-B] Collation http://saxon.sf.net/collation?class=CzechCollation has not been defined.
The line from my XSLT file is:  <xsl:sort select="Author" collation="http://saxon.sf.net/collation?class=CzechCollation"/>
The jar tf command tell me the jar file contains the following manifest (I know very little about java):
However, when I click on the jar , I get the error message: "failed to load Main-Class manifest attribute from ..." I assume this happens because the jar does not contain an application. Anyway, The CzechCollation.java file follows (Substantially shortened).

import java.text.ParseException;

import java.text.RuleBasedCollator;

public class CzechCollation extends RuleBasedCollator


public CzechCollation() throws ParseException




private static String upperAcuteA = new String("\u00c1");

private static String lowerAcuteA = new String("\u00e1");

private static String upperUmlatA = new String("\u00c4");

Many letter definations removed to keep email short

private static String upperHacekZ = new String("\u017d");

private static String lowerHacekZ = new String("\u017e");

private static String traditionalCzechRules =

("< A,a," + upperAcuteA + "," + lowerAcuteA + "," + upperUmlatA + "," + lowerUmlatA +

Many parts of the string removed to keep email short

"< Z,z <" + upperHacekZ + "," + lowerHacekZ);

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world

saxon-help mailing list archived at http://saxon.markmail.org/