You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Brian Minchau (JIRA)" <xa...@xml.apache.org> on 2005/07/13 06:57:11 UTC
[jira] Commented: (XALANJ-2157) Definition of CollatorFactory for XalanJ without translets
[ http://issues.apache.org/jira/browse/XALANJ-2157?page=comments#action_12315677 ]
Brian Minchau commented on XALANJ-2157:
---------------------------------------
The system property is set here:
System.getProperty("org.apache.xalan.transformer.COLLATOR_FACTORY");
which sets the class to be used as a collator factory.
This is a feature. This could be done for Xalan-J interpretive.
> 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: 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org