问题
We are using Layer7 which is an ESB featuring XML transformation with the help of XSLT1 and XSLT2.
They use XALAN and Saxon 9.4.0.4 but they enable the FEATURE_SECURE_PROCESSING flag.
For my tests I use a dedicated TransformerFactory class like this :
package company.transformer.factory;
import javax.xml.XMLConstants;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import net.sf.saxon.TransformerFactoryImpl;;
public class TransformerFactory extends TransformerFactoryImpl {
@Override
public Transformer newTransformer(Source arg0)
throws TransformerConfigurationException {
this.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,true);
Transformer t=super.newTransformer(arg0);
return t;
}
@Override
public Transformer newTransformer()
throws TransformerConfigurationException {
this.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,true);
Transformer t=super.newTransformer();
return t;
}
}
When using XSLT2, I can use "xsl:function" but once deployed on the ESB, this is ignored without making any error !
Can anyone tell me what is really supported by Layer7 in regard of XSLT1 and XSLT2 ?
来源:https://stackoverflow.com/questions/29428883/layer-7-xslt1-0-and-xslt2-0-compatibility