Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.6
-
None
-
None
-
PatchAvailable
Description
-
-
- 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
> catch (ClassNotFoundException e)
> catch (Exception e) {> throw new TransformerException(e);> }
>
> m_col = _collatorFactory.getCollator(m_locale);
> }
>
> if (null == m_col)
>
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