You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by chongma <ma...@nbmlaw.co.uk> on 2016/09/14 09:23:51 UTC

xslt transformer pass resource bundle

in TomEE Plume 1.7.3 i could pass a resource bundle to xslt using 
...
Transformer transformer = templates.newTransformer();
if (resourceBundle != null)
 transformer.setParameter("resources", resourceBundle);
...

then access it in the stylesheet by:
...
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:fo="http://www.w3.org/1999/XSL/Format"
 xmlns:java="java" exclude-result-prefixes="fo">
 <xsl:param name="resources" />
...
<xsl:value-of select="java:getString($resources,'ledger2')" />
...

i used to be able to just do:
<xsl:param name="resources"
select="java:util.ResourceBundle.getBundle('com.example.messages')" />
but that is another story

now in TomEE 7.0.1 Plus i get:
javax.xml.transform.TransformerConfigurationException: The first argument to
the non-static Java function 'getString' is not a valid object reference.

has anything changed with respect to the xslt processor that might have
changed how this works?  could you point me to an explanation of the new
method of getting it to work?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/xslt-transformer-pass-resource-bundle-tp4680115.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: xslt transformer pass resource bundle

Posted by chongma <ma...@nbmlaw.co.uk>.
if anyone ever finds this post i just converted the resourcebundle into a
list of properties and included it at the top level in my xml structure.  it
made extra work for me and it is quite unbelievable that there is no option
share a resourcebundle to xslt anymore



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/xslt-transformer-pass-resource-bundle-tp4680115p4680129.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: xslt transformer pass resource bundle

Posted by chongma <ma...@nbmlaw.co.uk>.
does tomee 7.0.1 provide xalan or some other xslt processor?  have java
extensions been disabled in the new version?  is there a setting to turn
them on or some way to force the desired effect?  is there another list i
should be asking these questions in?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/xslt-transformer-pass-resource-bundle-tp4680115p4680128.html
Sent from the TomEE Users mailing list archive at Nabble.com.