You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by techybolek <te...@yahoo.com> on 2014/05/17 02:54:00 UTC

javax.xml.transform.TransformerException: Extension function: '{http://www.w3.org/2005/xpath-functions}format-dateTime' can not be invoked when the XMLConstants.FEATURE_SECURE_PROCESSING feature is set to true.

I defined an XSLT transform in my route using:

     .to("xslt:mytransform.xsl")

The stylesheet is XSL 2.0 and is invoking a few 2.0 functions including
current-dateTime.

But I'm getting:
     javax.xml.transform.TransformerException: Extension function:
'{http://www.w3.org/2005/xpath-functions}format-dateTime'  can not be
invoked when the XMLConstants.FEATURE_SECURE_PROCESSING feature is set to
true.


I can see that the Xalan transformer is being used.
I understand that with Xalan not supporting XSL 2.0 I would not be able to
execute the transform anyway. My questions are:
1. Is there a way to get Camel to use a different processor that does
support XSL 2.0?
2. If there is, would the "FEATURE_SECURE_PROCESSING feature is set to
true." restriction still apply?
3. What's the recommended way to handle stylesheets like these, that invoke
Xpath functions? Would xalan extensions work?

Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/javax-xml-transform-TransformerException-Extension-function-http-www-w3-org-2005-xpath-functions-for-tp5751251.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: javax.xml.transform.TransformerException: Extension function: '{http://www.w3.org/2005/xpath-functions}format-dateTime' can not be invoked when the XMLConstants.FEATURE_SECURE_PROCESSING feature is set to true.

Posted by techybolek <te...@yahoo.com>.
Found the answer here:
http://comments.gmane.org/gmane.comp.apache.camel.user/15776

Basically the solution is to declare a transformer factory instance as a
spring bean, ensure it's nonsecure (by simply not setting
FEATURE_SECURE_PROCESSING) and indicate to use that factory in the
transformation step in the route.




--
View this message in context: http://camel.465427.n5.nabble.com/javax-xml-transform-TransformerException-Extension-function-http-www-w3-org-2005-xpath-functions-for-tp5751251p5751256.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: javax.xml.transform.TransformerException: Extension function: '{http://www.w3.org/2005/xpath-functions}format-dateTime' can not be invoked when the XMLConstants.FEATURE_SECURE_PROCESSING feature is set to true.

Posted by techybolek <te...@yahoo.com>.
I replaced the XPATH 2.0 calls with Xalan extensions and now I'm getting:

javax.xml.transform.TransformerException: Extension function:
'{http://exslt.org/dates-and-times}date-time' can not be invoked when the
XMLConstants.FEATURE_SECURE_PROCESSING feature is set to true.


Is there any way out of this?




--
View this message in context: http://camel.465427.n5.nabble.com/javax-xml-transform-TransformerException-Extension-function-http-www-w3-org-2005-xpath-functions-for-tp5751251p5751253.html
Sent from the Camel - Users mailing list archive at Nabble.com.