Hello i tried this code in my stylesheet :
xsl:variable name="items"
select="xsl-usexsl:getEleme ntsBySplitStrin g(.,'i')" />
whith the java function getElementsBySp litString
here the code :
public static Element getElementsBySp litString(Strin g aToSplit, String
aSeparator) throws UseXslException {
// Declaration
int intFound = 0;
// Trace
Log.debug(Const antes.CLE_METIE R, mClassName,
"getElementsByS plitString : DEBUT");
try {
Element items= new Element("ITEMS" );
if (aToSplit != null) {
intFound = aToSplit.indexO f(aSeparator);
while (intFound != -1) {
Element item = new Element("ITEM", aToSplit.substr ing(0,
intFound));
items.addConten t(item);
aToSplit = aToSplit.substr ing(intFound + 1);
intFound = aToSplit.indexO f(aSeparator);
}
if (aToSplit.lengt h() 0){
Element item = new Element("ITEM", aToSplit);
items.addConten t(item);
}
}
// Trace
Log.debug(Const antes.CLE_METIE R, mClassName,
"getElementsByS plitString : FIN");
return items;
} catch (Exception MyE) {
// Signalisation
Log.erreur(Cons tantes.CLE_METI ER, "split : " + MyE.getMessage( ));
// Propagation
throw new UseXslException ("Impossible de formater une chaine de
caractere en un Node");
}
}
and i get the following error :
org/apache/xpath/objects/XObject incompatible with
org/apache/xpath/objects/XNodeSet
Has someone anyidea for resolve this problem ?
thanks