[ http://issues.apache.org/jira/browse/XALANJ-2157?page=comments#action_12373121 ]
Brian Minchau commented on XALANJ-2157: --------------------------------------- Comments from JIRA bug Triage on Febrary 7, 2006: > Was discussed in another JIRA meeting, and the problem with this patch is that it makes the interpretive processor depend on XSLTC. Not using the usual mechanisms for finding service providers. It uses a system property to find the name of a service. > It a reasonable feature but should use the usual mechanism for getting a service provider. > Henry Z. agreed to post comments. > Definition of CollatorFactory for XalanJ without translets > ---------------------------------------------------------- > > Key: XALANJ-2157 > URL: http://issues.apache.org/jira/browse/XALANJ-2157 > Project: XalanJ2 > Type: Improvement > Components: Xalan > Versions: 2.6 > Reporter: Franz Fackelmann > Attachments: org.apache.xalan.transformer.2157.patch.txt, > xalan-j_2_6_0-src-patch2.2-feature.zip > > *** Feature request in org.apache.xalan.transformer.NodeSortKey *** > The class org.apache.xalan.xsltc.dom.NodeSortRecord allows one to use a > user-defined CollatorFactory for sorting. Unfortunatelly this feature works > only in conjuction with translets. It would be nice to have a similar feature > for the non-translet based transformations. > The following patch (relative to NodeSortKey.java,v 1.13) adds this feature > to Xalan: > diff src/org/apache/xalan/transformer/NodeSortKey.java: > 23a24,25 > > import javax.xml.transform.TransformerException; > > > 24a27 > > import org.apache.xalan.xsltc.CollatorFactory; > 117,118c120,145 > < m_col = Collator.getInstance(m_locale); > < > --- > > // Try to use collator factory (as it happens for xsltc) > > String colFactClassname = > > System.getProperty("org.apache.xalan.transformer.COLLATOR_FACTORY"); > > > > if (colFactClassname != null) { > > CollatorFactory _collatorFactory = null; > > try { > > Class candClass = ObjectFactory.findProviderClass(colFactClassname, > > ObjectFactory.findClassLoader(), true); > > Object candObj = candClass.newInstance(); > > _collatorFactory = (CollatorFactory) candObj; > > } > > catch (ClassNotFoundException e) { > > throw new TransformerException(e); > > } > > catch (Exception e) { > > throw new TransformerException(e); > > } > > > > m_col = _collatorFactory.getCollator(m_locale); > > } > > > > if (null == m_col) { > > m_col = Collator.getInstance(m_locale); > > } > > > In addition the following new files are required (see attachement): > src\org\apache\xalan\transformer\ObjectFactory.java > src\org\apache\xalan\transformer\SecuritySupport.java > src\org\apache\xalan\transformer\SecuritySupport12.java -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
