Thanks all for your answers :
Here is the final result
TransformerFactory tFactory = TransformerFactory.newInstance();
InputStream xslt = FeedSecurityException.class.getResourceAsStream("/filter.xslt");
Transformer transformer = tFactory.newTransformer(new StreamSource(xslt));
transformer.transform(new StreamSource(input), new StreamResult(ouput));
And the XSLT which call the java method for a kind of node and leave the others untouched
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java">
<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="no" />
<xsl:template match="CHANGED_NODE">
<xsl:element name="CHANGED_NODE">
<xsl:value-of select="java:com.mypackage.MyClass.tranformContent(.)"/>
</xsl:element>
</xsl:template>
<xsl:template match="node()|@*">
<xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy>
</xsl:template>
</xsl:stylesheet>