Bug #6014
open
Allowed protocols restrictions don't work in Saxon 11
0%
Description
Or at least, some of them don't. For example jaxptest.AllowedProtocolsTest.testExternalProtocolDTD003
fails.
Updated by Michael Kay about 1 month ago
It seems to be the same problem as #6013. The test case is explicitly trying to load "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl" and that doesn't work in JDK 9+. JAXP (from JDK9) has a mechanism to load the JDK default parser without doing dynamic loading, but we don't provide a way to request that via TransformerFactory
properties.
Updated by Norm Tovey-Walsh about 1 month ago
I'm not sure I agree. The #6013 issue is about the illegal reflective access warning message from JDK9, but that is (or claims to be) only a warning. I think this is about the rule for allowed protocols not getting passed all the way through to the resolver, which happily pulls the file URI and causes the test to fail.
Updated by Norm Tovey-Walsh about 1 month ago
In fact commit 1ec3d8b6
fixes this bug on the saxon12
branch by setting the Feature.ALLOWED_PROTOCOLS
feature in addition to the factory setting.
I wonder if that was an appropriate fix...given that I can't think of any way to interrogate the factory for the setting later on, I don't think we can do any better...
Updated by Norm Tovey-Walsh about 1 month ago
- Fix Committed on Branch 11 added
I've committed the fix from the saxon12
branch and the test now passes. I'm not closing this yet because it feels like there's still a possibility of further discussion.
Please register to edit this issue