> My stylesheet: > > component.xsl: > > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:i18n="http://apache.org/cocoon/i18n/2.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:template match="test-navi"> > > <xsl:param name="action" select="action"/> > > <TABLE> > <FORM METHOD="post" NAME="batch"> > <xsl:attribute name="ACTION"><xsl:value-of > select="$action"/></xsl:attribute> > <TR> > <TD> > <A> > <xsl:attribute name="HREF"><xsl:value-of > select="$action"/></xsl:attribute> > <xsl:attribute name="ONCLICK">document.batch.submit(); return > (false)</xsl:attribute> > <xsl:text><i18n:text i18n:key="go">GO!</i18n:text></xsl:text>
Simply remove <xsl:text></xsl:text> and leave only <i18n:text /> you'll get what you want. This is a pure XSLT problem and has nothing to do with i18n. You cannot use markup inside of <xsl:text/>. -- Konstantin > </A> > </TD> > </TR> > </FORM> > </TABLE> > > </xsl:template> > > <xsl:template match="node()|@*" priority="-1"> > <xsl:copy> > <xsl:apply-templates select="node()|@*"/> > </xsl:copy> > </xsl:template> > > </xsl:stylesheet> > > messages.xml > <catalogue xml:lang="pl"> > <message key="go">IDZ</message> > </catalogue> > > in error.log is: > ERROR (2002-04-23) 14:56.55:129[core.xslt-processor](/cocoon/my/employees) > HttpProcessor[8080][4]/TraxErrorHandler: Error in TraxTransformer: > file:/E:/tomcat/webapps/cocoon/my/stylesheets/component.xsl; Line 64; Column > 99; > ; SystemID: file:/E:/tomcat/webapps/cocoon/my/stylesheets/component.xsl; > Line#: 64; Column#: 99 > javax.xml.transform.TransformerException: i18n:text is not allowed in this > position in the stylesheet! > > sitemap.log and rest have something like (i can send if it will be needed): > ERROR (2002-04-23) 14:56.55:149 [sitemap](/cocoon/my/employees) > HttpProcessor[8080][4]/sitemap_xmap: Sitemap > org.apache.cocoon.ProcessingException: Exception in creating Transform > Handler: java.lang.NullPointerException > > Trouble is that my stylesheet need to insert <i18n> tag which will be > processed on. Then i get error. When i have i18n in serverpages generator > all work ok. > I suppose i have trouble with namespaces but where i need insert it (xmlns)? > I have it in xsl:stylesheet. > > ----- Original Message ----- > From: "Konstantin Piroumian" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April 23, 2002 2:28 PM > Subject: Re: i18n in xslt > > > > > No. I have messages.xml only. If i think properly when i have no > > specialized > > > message_locale.xml file general message.xml will be used - am i right? > So > > i > > > needn't specify locale request parameter...? > > > > Yes, exactly like that! > > > > > When i try to use <i18n> tags in my any.xml all works good. > > > But i want to avoid this and try to use <i18n> in transformer: > > > > > > transformer pipe is: > > > > > > <map:generate type="serverpages" src="any.xml"/> <!-- here runs > > logicsheets > > > that insert component data processed on by XSLT transformers --> > > > <map:transform type="xslt" src="component.xsl"/> <!-- any component XSLT > > > transformer --> > > > <map:transform type="i18n"/> > > > <map:serialize type="xml"/> > > > > This should work. > > > > > > > > My main idea is to transformer component.xsl insert internationalization > > > information in XHTML like: > > > - button labels, > > > - comment, > > > - help text for user > > > in my component only. But i want to avoid insertion this information in > > file > > > processed by generator and passing it on. But maybe it is better > (simpler) > > > way? > > > > What is the exact problem with it? Have you looked at logs? > > > > -- > > Konstantin > > > > > > > > ----- Original Message ----- > > > From: "KOZLOV Roman" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Tuesday, April 23, 2002 2:02 PM > > > Subject: Re: i18n in xslt > > > > > > > > > > Hello, > > > > > > > > Do you specify request parameter "locale" with value for which > > > > messages_<lng>.xml exists? > > > > > > > > Roman > > > > > > > > Jerzy Kut wrote: > > > > > > > > > Sorry - of course. But it don't helps. I paste only abbrewiated > > snippets > > > > > into post. > > > > > But thank You. > > > > > Trouble is located somewhere in component.xslt i think, but i don't > > > > > understand why nullpointerexception is throwed... > > > > > > > > > > ----- Original Message ----- > > > > > From: "TREGAN Fabien" <[EMAIL PROTECTED]> > > > > > To: <[EMAIL PROTECTED]> > > > > > Sent: Tuesday, April 23, 2002 1:09 PM > > > > > Subject: RE: i18n in xslt > > > > > > > > > > > not sure this will help but... > > > > > > > > > > > > >my-space.xsl - logicsheet processing tag for other tags > > > > > > ><template match="my-space:component> > > > > > > ^^^^ > > > missing an > > > > > " > > > > > > here > > > > > > > <struct> > > > > > > > <item1>any_link</item1> > > > > > > > <item2/> > > > > > > > </struct> > > > > > > ></template> > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > Please check that your question has not already been answered in > the > > > > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > > > > > > > > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > > > > > For additional commands, e-mail: > <[EMAIL PROTECTED]> > > > > > > > > > > > --------------------------------------------------------------------- > > > > > Please check that your question has not already been answered in the > > > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > > > > > > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > > > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > > > > > > > > > > --------------------------------------------------------------------- > > > > Please check that your question has not already been answered in the > > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > > > > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > > > > > > > --------------------------------------------------------------------- > > > Please check that your question has not already been answered in the > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>