i want to transform a XML by XSLT with XALAN. Now i want to use a extension-function, this function have to be added in JAVA source like in SAXON:
Method:
TransformerFactory tFactory = TransformerFactory.newInstance();
Configuration c = ((net.sf.saxon.TransformerFactoryImpl) tFactory).getConfiguration();
c.registerExtensionFunction(new FooExtension());
FooExtension:
public class FooExtension extends ExtensionFunctionDefinition {
private static final long serialVersionUID = -8143237239412146617L;
@Override
public SequenceType[] getArgumentTypes() {
return new SequenceType[] { SequenceType.EMPTY_SEQUENCE };
}
@Override
public StructuredQName getFunctionQName() {
return new StructuredQName("ns", "http://namespace", "generate-guid");
}
}
But how does it works in XALAN (?FunctionTable?, ?FunctionResolver?, ?URIResolver?) , i have to do it by source, i'm not allowed to add class in XSLT.
Thanks!!