Bug #2750
closedSetting of fileExtension on configuration file does not take effect
100%
Description
Given the following command:
java -classpath saxon9ee.jar net.sf.saxon.Transform -config:config.xml -it:main -t -xsl:test.xsl
It seems like setting the resource fileExtension mapping in the config file does not take effect:
<configuration edition="EE" xmlns="http://saxon.sf.net/ns/configuration">
<global expandAttributeDefaults="false" validationComments="true" />
<xslt recoveryPolicy="doNotRecover" />
<serialization saxon:indent-spaces="4" xmlns:saxon="http://saxon.sf.net/" />
<resources>
<fileExtension extension="rdf" mediaType="application/xml" />
</resources>
</configuration>
Updated by Michael Kay over 8 years ago
A similar test case (but using XQuery rather than XSLT) is working for me.
Updated by O'Neil Delpratt over 8 years ago
The issue is that the catalog file allows users to setup a file mapping from file extensions to media types. But it does not allow the mapping from media types to resource factories to be changed. In this particular instance the current mime type was obtained from the HTTP connection but Saxon did not have a mapping for this mime type to the XmlResource.FACTORY.
Updated by Michael Kay over 8 years ago
- Status changed from New to Resolved
- Applies to branch 9.8 added
- Fix Committed on Branch 9.7 added
As a first step I have moved the mapping table from media types to ResourceFactory objects from the AbstractResourceFactory object to the Configuration object. This removes the ability to customize it on a per-collection basis, but it makes it much easier to customize without complex subclassing, and it opens the way to allow it to be configured via the Configuration file. A new media type can now be introduced by an API call of the form
configuration.registerMediaType("application/musicxml", XmlResource.FACTORY).
(As well as the standard factories like XmlResource.FACTORY, new user-defined resource factories can also be used).
Fix committed on the 9.7 and 9.8 branches.
Updated by O'Neil Delpratt over 8 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.6 added
Bug fixed in maintenance release 9.7.0.6.
Updated by O'Neil Delpratt over 7 years ago
- Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
Please register to edit this issue