On Wednesday 18 September 2002 17:09, Mathias Ochsendorf wrote: > > <a href="/test"> > > <img> > > <xsl:attribute name="src"> > > <i18n:translate> > > ><i18n:text>/images/test.svg?label_text={0}&label_color={1}</i18n:t > >ext> <i18n:param><i18n:text>hello</i18n:text></i18n:param> > > <i18n:param><i18n:text>red</i18n:text></i18n:param> > > </i18n:translate> > > </xsl:attribute> > > </img> > > </a> > > unfortunately this approach doesn't work. it causes a > nullpointerexception: > > Original exception : > org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException: Exception in > creating Transform Handler > at > org.apache.avalon.excalibur.xml.xslt.XSLTProcessorImpl.getTransformerHandle >rAndValidity(XSLTProcessorImpl.java:287) at > org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java >:333)
Sure it will couse a nullpointerexception. First of all you need to to get from this snip something like this: <a href="/test"> <img> <xsl:attribute name="src"> /images/test.svg?label_text=hello&label_color=red </xsl:attribute> </img> </a> and than use this stylesheet See example: Your sitemap should have: <map:match pattern="stylesheets/*.xsl"> <map:generate src="stylesheets/{1}.xsl"/> <map:transform type="i18n"/> <!-- will generate a valid xsl without i18n tags, and it will not couse an error anymore --> <map:serialize type="xml"/> </map:match> <map:match pattern="..."> <map:generate src="<you-source>"/> <map:transform src="cocoon:/stylesheets/<stylesheet-with-my-snip>.xsl"/> <!-- use stylesheet generated by previous pipeline --> <map:serialize/> </map:match> Regards! Ivan Luzyanin. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>