You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Stoeckel, Matthias" <Ma...@Dresdner-Bank.com> on 2003/04/28 15:03:19 UTC

[Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Hi,

there seems to be an error with the combination of the new Xalan (2.5) and
the i18n transformer.
I'm using the following setup:
- Latest Source from this morning.
- modified Hello World sample
- jdk 1.3.1_06 on solaris

This is the modified pipeline for the Hello World sample:

   <map:match pattern="hello.html">
    <map:generate src="content/hello.xml"/>
    <map:transform src="style/xsl/page2html.xsl" type="xalan"/>
<!-- some dummy transformations -->
    <map:transform src="ident.xsl" type="xalan"/>
    <map:transform src="ident.xsl" type="xalan"/>
    <map:transform src="ident.xsl" type="xalan"/>
    <map:transform  type="i18n">
           <map:parameter name="locale" value="de"/>
    </map:transform>    
    <map:serialize type="html"/>
   </map:match>

Modified hello.xml:

<?xml version="1.0"?>
<page xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
 <title>Hello</title>
 <content>
  <para>This is my first Cocoon page!
  <i18n:text>a_key</i18n:text>
</para>
 </content>
</page>


The ident.xsl source code, which simply copies all tags from input to
output:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*"/>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

I'm also using the message catalogue from the i18n sample. As long as I have
only one Xalan transformation everything works fine. But as soon as I add
another transformation the output gets corrupted. Some (all?) closing tags
get lost after the i18n transformation. This problem stops when I use the
old Xalan 2.4.1!
Does anybody have an idea how to fix this? I can provide a zip file with the
modified hello world example, if wanted.
Thanks
  Matthias



Re: M2 planning [was: Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot]

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Torsten Curdt dijo:
>> And personally, I believe we should make both .zip and .tgz releases,
>> done on the respective platforms.
>
> Hm... really?
>
> I never understood why people would go for the zip if a (usually
> smaller) tgz is available. Also for windows the common compression
> utilities support tgz now.

Yeah :-) But there is also bz2 that is better! ;-)

For windows I recommend a nice zip utility. I use it sometimes when I work
on Windows:

http://www.7-zip.org/

Best Regards,

Antonio Gallardo

>
> *shrug*
> --
> Torsten




Re: M2 planning [was: Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot]

Posted by Torsten Curdt <tc...@dff.st>.
> And personally, I believe we should make both .zip and .tgz releases, 
> done on the respective platforms.

Hm... really?

I never understood why people would go for the zip if a (usually
smaller) tgz is available. Also for windows the common compression
utilities support tgz now.

*shrug*
--
Torsten


Re: M2 planning [was: Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot]

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Pier Fumagalli dijo:
> On 2/5/03 7:00, "Carsten Ziegeler" <cz...@s-und-n.de> wrote:
>
>> I alreaded noted 20th of May as the release date for M2.
>
> +1 on the 20th...
>
>     Pier

+1000

The next day is my birthday! Thanks for this GREAT gift! ;-)

Antonio Gallardo





Re: M2 planning [was: Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot]

Posted by Pier Fumagalli <pi...@betaversion.org>.
On 2/5/03 7:00, "Carsten Ziegeler" <cz...@s-und-n.de> wrote:

> I alreaded noted 20th of May as the release date for M2.

+1 on the 20th...

    Pier


RE: M2 planning [was: Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot]

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
I alreaded noted 20th of May as the release date for M2.

PS: I will add my notes about making a release asap.

Carsten

> -----Original Message-----
> From: Steven Noels [mailto:stevenn@outerthought.org]
> Sent: Thursday, May 01, 2003 11:21 PM
> To: cocoon-dev@xml.apache.org
> Subject: M2 planning [was: Re: [Bug] multiple Xalan transformations and
> i18n doesn't function wi th latest Cocoon snapshot]
> 
> 
> On 1/05/2003 23:17 Steven Noels wrote:
> 
> > Then again, what was the original reason for adding 2.5 instead of 
> > 2.4.1? We might as well revert now and hopefully 2.6 will be out soon 
> > enough.
> > 
> > <caveat>I might be talking through my nose.</caveat>
> 
> Given the UNIX permission issues with the current M1, we should not 
> postpone M2 much longer than 3 weeks IMHO.
> 
> And personally, I believe we should make both .zip and .tgz releases, 
> done on the respective platforms.
> 
> </Steven>
> -- 
> Steven Noels                            http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> Read my weblog at            http://blogs.cocoondev.org/stevenn/
> stevenn at outerthought.org                stevenn at apache.org
> 

M2 planning [was: Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot]

Posted by Steven Noels <st...@outerthought.org>.
On 1/05/2003 23:17 Steven Noels wrote:

> Then again, what was the original reason for adding 2.5 instead of 
> 2.4.1? We might as well revert now and hopefully 2.6 will be out soon 
> enough.
> 
> <caveat>I might be talking through my nose.</caveat>

Given the UNIX permission issues with the current M1, we should not 
postpone M2 much longer than 3 weeks IMHO.

And personally, I believe we should make both .zip and .tgz releases, 
done on the respective platforms.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


Re: Use Xalan CVS snapshot instead of released version?

Posted by Stefano Mazzocchi <st...@apache.org>.
on 5/7/03 3:42 AM David Crossley wrote:

> Bruno Dumon wrote:
> 
>>Bruno Dumon wrote:
>>
>>>But I'll subscribe to xalan-dev and ask...
>>
>>fyi: a Xalan 2.5.1 release can be expected in a week or two.
> 
> 
> <joke-about-release-dates>
>   Is a Xalan week the same duration as a Cocoon week?
> </joke-about-release-dates>

LOL! :-)

Good one, David, good one.

-- 
Stefano.



Re: Use Xalan CVS snapshot instead of released version?

Posted by David Crossley <cr...@indexgeo.com.au>.
Bruno Dumon wrote:
> Bruno Dumon wrote:
> > But I'll subscribe to xalan-dev and ask...
> 
> fyi: a Xalan 2.5.1 release can be expected in a week or two.

<joke-about-release-dates>
  Is a Xalan week the same duration as a Cocoon week?
</joke-about-release-dates>




Re: Use Xalan CVS snapshot instead of released version? (was Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot)

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2003-05-05 at 16:07, Bruno Dumon wrote:
> But I'll subscribe to xalan-dev and ask...

fyi: a Xalan 2.5.1 release can be expected in a week or two.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: Use Xalan CVS snapshot instead of released version? (was Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot)

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2003-05-05 at 15:58, Joerg Heinicke wrote:
> > Where do we go from here? Wait some more? We should make a decission
> > before the M2 release.
> > 
> > To summarize the situation:
> > Xalan 2.5 contains a blocking bug (namespaces in endElement events can
> > be incorrect when mixing namespaced and non-namespaced elements). This
> > bug is fixed in Xalan CVS. So now we can either go back to 2.4.1 while
> > waiting for a 2.5.1, or we can work with a CVS snapshot.
> 
> Isn't it possible to "force" the Xalan group to release 2.5.1. It must be 
> possible, if it's so a heavy blocker bug. Isn't it?
> 

Most users of xalan won't ever notice this, you'll only see it when
using xalan in sax-pipelines, with non-xsl transformers reacting on the
output of the xalan transformer (such as the i18n-transformer).

But I'll subscribe to xalan-dev and ask...

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: Use Xalan CVS snapshot instead of released version? (was Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot)

Posted by Joerg Heinicke <jo...@gmx.de>.
> Where do we go from here? Wait some more? We should make a decission
> before the M2 release.
> 
> To summarize the situation:
> Xalan 2.5 contains a blocking bug (namespaces in endElement events can
> be incorrect when mixing namespaced and non-namespaced elements). This
> bug is fixed in Xalan CVS. So now we can either go back to 2.4.1 while
> waiting for a 2.5.1, or we can work with a CVS snapshot.

Isn't it possible to "force" the Xalan group to release 2.5.1. It must be 
possible, if it's so a heavy blocker bug. Isn't it?

Joerg

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


Re: Use Xalan CVS snapshot instead of released version? (was Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot)

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Bruno Dumon wrote, On 05/05/2003 15.45:
...
> To summarize the situation:
> Xalan 2.5 contains a blocking bug (namespaces in endElement events can
> be incorrect when mixing namespaced and non-namespaced elements). This
> bug is fixed in Xalan CVS. So now we can either go back to 2.4.1 while
> waiting for a 2.5.1, or we can work with a CVS snapshot.

+1 for CVS snapshot
+1 for asking for a 2.5.1 release ASAP

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Use Xalan CVS snapshot instead of released version? (was Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot)

Posted by Stephan Michels <st...@apache.org>.
On 5 May 2003, Bruno Dumon wrote:

> On Mon, 2003-05-05 at 14:52, David Crossley wrote:
> > Bruno Dumon wrote:
> > > Vadim Gritsenko wrote:
> > > > Steven Noels wrote:
> > > > >Bruno Dumon wrote:
> > > > >
> > > > >> I think Xalan may be an exception to this rule, since it's not as if we
> > > > >> depend on specific features or API's of this newer version. We can
> > > > >> always go back to 2.4.1 if we would make a final Cocoon 2.1 release
> > > > >> before Xalan 2.6 is released.
> > > > >
> > > > > Then again, what was the original reason for adding 2.5 instead of
> > > > > 2.4.1?
> > >
> > > The question should be: why not?
> > >
> > > > > We might as well revert now and hopefully 2.6 will be out soon
> > > > > enough.
> > > >
> > > > I'm more in favor of reverting to older version than adding CVS version.
> > >
> > > Hmmm, that's then two against one.
> > >
> > > If we revert to 2.4.1 now, we'll never spot any other bugs in 2.5, and
> > > so 2.6 may also not be usable for us.
> > >
> > > But I'm happy to follow the majority, if nobody else speaks up, I'll
> > > revert to 2.4.1 by, say, monday evening.
> >
> > I will level the score then - i am in favour of using newer versions
> > of important jars.
> >
>
> Where do we go from here? Wait some more? We should make a decission
> before the M2 release.
>
> To summarize the situation:
> Xalan 2.5 contains a blocking bug (namespaces in endElement events can
> be incorrect when mixing namespaced and non-namespaced elements). This
> bug is fixed in Xalan CVS. So now we can either go back to 2.4.1 while
> waiting for a 2.5.1, or we can work with a CVS snapshot.

So for me there is only one option.

So +1 for using a CVS snapshot, and nagging the Xalan people for
a new release ;-)

Stephan.


Use Xalan CVS snapshot instead of released version? (was Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot)

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2003-05-05 at 14:52, David Crossley wrote:
> Bruno Dumon wrote:
> > Vadim Gritsenko wrote:
> > > Steven Noels wrote:
> > > >Bruno Dumon wrote:
> > > >
> > > >> I think Xalan may be an exception to this rule, since it's not as if we
> > > >> depend on specific features or API's of this newer version. We can
> > > >> always go back to 2.4.1 if we would make a final Cocoon 2.1 release
> > > >> before Xalan 2.6 is released.
> > > >
> > > > Then again, what was the original reason for adding 2.5 instead of 
> > > > 2.4.1?
> > 
> > The question should be: why not?
> > 
> > > > We might as well revert now and hopefully 2.6 will be out soon 
> > > > enough.
> > > 
> > > I'm more in favor of reverting to older version than adding CVS version.
> > 
> > Hmmm, that's then two against one.
> > 
> > If we revert to 2.4.1 now, we'll never spot any other bugs in 2.5, and
> > so 2.6 may also not be usable for us.
> > 
> > But I'm happy to follow the majority, if nobody else speaks up, I'll
> > revert to 2.4.1 by, say, monday evening.
> 
> I will level the score then - i am in favour of using newer versions
> of important jars.
> 

Where do we go from here? Wait some more? We should make a decission
before the M2 release.

To summarize the situation:
Xalan 2.5 contains a blocking bug (namespaces in endElement events can
be incorrect when mixing namespaced and non-namespaced elements). This
bug is fixed in Xalan CVS. So now we can either go back to 2.4.1 while
waiting for a 2.5.1, or we can work with a CVS snapshot.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by David Crossley <cr...@indexgeo.com.au>.
Bruno Dumon wrote:
> Vadim Gritsenko wrote:
> > Steven Noels wrote:
> > >Bruno Dumon wrote:
> > >
> > >> I think Xalan may be an exception to this rule, since it's not as if we
> > >> depend on specific features or API's of this newer version. We can
> > >> always go back to 2.4.1 if we would make a final Cocoon 2.1 release
> > >> before Xalan 2.6 is released.
> > >
> > > Then again, what was the original reason for adding 2.5 instead of 
> > > 2.4.1?
> 
> The question should be: why not?
> 
> > > We might as well revert now and hopefully 2.6 will be out soon 
> > > enough.
> > 
> > I'm more in favor of reverting to older version than adding CVS version.
> 
> Hmmm, that's then two against one.
> 
> If we revert to 2.4.1 now, we'll never spot any other bugs in 2.5, and
> so 2.6 may also not be usable for us.
> 
> But I'm happy to follow the majority, if nobody else speaks up, I'll
> revert to 2.4.1 by, say, monday evening.

I will level the score then - i am in favour of using newer versions
of important jars.

--David



Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by Bruno Dumon <br...@outerthought.org>.
On Fri, 2003-05-02 at 01:07, Vadim Gritsenko wrote:
> Steven Noels wrote:
> 
> > On 1/05/2003 22:20 Bruno Dumon wrote:
> >
> >> I think Xalan may be an exception to this rule, since it's not as if we
> >> depend on specific features or API's of this newer version. We can
> >> always go back to 2.4.1 if we would make a final Cocoon 2.1 release
> >> before Xalan 2.6 is released.
> >
> >
> > Then again, what was the original reason for adding 2.5 instead of 
> > 2.4.1?

The question should be: why not?

>  We might as well revert now and hopefully 2.6 will be out soon 
> > enough.
> 
> 
> I'm more in favor of reverting to older version than adding CVS version.

Hmmm, that's then two against one.

If we revert to 2.4.1 now, we'll never spot any other bugs in 2.5, and
so 2.6 may also not be usable for us.

But I'm happy to follow the majority, if nobody else speaks up, I'll
revert to 2.4.1 by, say, monday evening.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by Vadim Gritsenko <va...@verizon.net>.
Steven Noels wrote:

> On 1/05/2003 22:20 Bruno Dumon wrote:
>
>> I think Xalan may be an exception to this rule, since it's not as if we
>> depend on specific features or API's of this newer version. We can
>> always go back to 2.4.1 if we would make a final Cocoon 2.1 release
>> before Xalan 2.6 is released.
>
>
> Then again, what was the original reason for adding 2.5 instead of 
> 2.4.1? We might as well revert now and hopefully 2.6 will be out soon 
> enough.


I'm more in favor of reverting to older version than adding CVS version.


> <caveat>I might be talking through my nose.</caveat> 


Caught a cold?

Vadim



Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by Steven Noels <st...@outerthought.org>.
On 1/05/2003 22:20 Bruno Dumon wrote:

> I think Xalan may be an exception to this rule, since it's not as if we
> depend on specific features or API's of this newer version. We can
> always go back to 2.4.1 if we would make a final Cocoon 2.1 release
> before Xalan 2.6 is released.

Then again, what was the original reason for adding 2.5 instead of 
2.4.1? We might as well revert now and hopefully 2.6 will be out soon 
enough.

<caveat>I might be talking through my nose.</caveat>

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2003-05-01 at 22:00, Vadim Gritsenko wrote:
> Bruno Dumon wrote:
> 
> >This bug has now been fixed in Xalan CVS.
> >
> >Does anyone mind if we upgrade to a xalan cvs snapshot?
> >  
> >
> 
> Can we wait some for some release of Xalan? IIRC, we are moving towards 
> all-released-libraries, not all-CVS-libraries... ;-)
> 

Ah, ok, forgot about that. But the bug in question is really huge, I
think we can't afford to stay with the 2.5 release.

I think Xalan may be an exception to this rule, since it's not as if we
depend on specific features or API's of this newer version. We can
always go back to 2.4.1 if we would make a final Cocoon 2.1 release
before Xalan 2.6 is released.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by Vadim Gritsenko <va...@verizon.net>.
Bruno Dumon wrote:

>This bug has now been fixed in Xalan CVS.
>
>Does anyone mind if we upgrade to a xalan cvs snapshot?
>  
>

Can we wait some for some release of Xalan? IIRC, we are moving towards 
all-released-libraries, not all-CVS-libraries... ;-)

Vadim



Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by Bruno Dumon <br...@outerthought.org>.
This bug has now been fixed in Xalan CVS.

Does anyone mind if we upgrade to a xalan cvs snapshot?

(this bug is quite critical for the correct operation of our pipelines
in case of namespaces)

On Mon, 2003-04-28 at 17:57, Bruno Dumon wrote:
> On Mon, 2003-04-28 at 17:30, Bruno Dumon wrote:
> > On Mon, 2003-04-28 at 15:03, Stoeckel, Matthias wrote:
> > > Hi,
> > > 
> > > there seems to be an error with the combination of the new Xalan (2.5) and
> > > the i18n transformer.
> > > I'm using the following setup:
> > > - Latest Source from this morning.
> > > - modified Hello World sample
> > > - jdk 1.3.1_06 on solaris
> > > 
> > 
> > Hi Matthias,
> > 
> > I've reproduced your problem. Seems to be a Xalan problem, if you put a
> > logtransformer before and after the first ident.xsl you'll see that
> > Xalan generates incorrect endElement SAX-events (so it is not really
> > related to the i18n transformer).
> > 
> > I just tried the same with a minimal test application outside Cocoon,
> > and it has the same problem. I'll file a bug report with Xalan for this.
> 
> And can be followed up here:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19388
-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2003-04-28 at 17:30, Bruno Dumon wrote:
> On Mon, 2003-04-28 at 15:03, Stoeckel, Matthias wrote:
> > Hi,
> > 
> > there seems to be an error with the combination of the new Xalan (2.5) and
> > the i18n transformer.
> > I'm using the following setup:
> > - Latest Source from this morning.
> > - modified Hello World sample
> > - jdk 1.3.1_06 on solaris
> > 
> 
> Hi Matthias,
> 
> I've reproduced your problem. Seems to be a Xalan problem, if you put a
> logtransformer before and after the first ident.xsl you'll see that
> Xalan generates incorrect endElement SAX-events (so it is not really
> related to the i18n transformer).
> 
> I just tried the same with a minimal test application outside Cocoon,
> and it has the same problem. I'll file a bug report with Xalan for this.

And can be followed up here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19388

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: [Bug] multiple Xalan transformations and i18n doesn't function wi th latest Cocoon snapshot

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2003-04-28 at 15:03, Stoeckel, Matthias wrote:
> Hi,
> 
> there seems to be an error with the combination of the new Xalan (2.5) and
> the i18n transformer.
> I'm using the following setup:
> - Latest Source from this morning.
> - modified Hello World sample
> - jdk 1.3.1_06 on solaris
> 

Hi Matthias,

I've reproduced your problem. Seems to be a Xalan problem, if you put a
logtransformer before and after the first ident.xsl you'll see that
Xalan generates incorrect endElement SAX-events (so it is not really
related to the i18n transformer).

I just tried the same with a minimal test application outside Cocoon,
and it has the same problem. I'll file a bug report with Xalan for this.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: [Bug] multiple Xalan transformations and i18n doesn't function with latest Cocoon snapshot

Posted by Konstantin Piroumian <kp...@apache.org>.
This seems to be a namespace problem.
Check the result after each transformation and see if i18n tags and
namespace are correctly preserved. Also, check if there are any exceptions
in logs, i18n transformer is very verbose.

Regards,
  Konstantin

From: "Stoeckel, Matthias" <Ma...@Dresdner-Bank.com>

> Hi,
>
> there seems to be an error with the combination of the new Xalan (2.5) and
> the i18n transformer.
> I'm using the following setup:
> - Latest Source from this morning.
> - modified Hello World sample
> - jdk 1.3.1_06 on solaris
>
> This is the modified pipeline for the Hello World sample:
>
>    <map:match pattern="hello.html">
>     <map:generate src="content/hello.xml"/>
>     <map:transform src="style/xsl/page2html.xsl" type="xalan"/>
> <!-- some dummy transformations -->
>     <map:transform src="ident.xsl" type="xalan"/>
>     <map:transform src="ident.xsl" type="xalan"/>
>     <map:transform src="ident.xsl" type="xalan"/>
>     <map:transform  type="i18n">
>            <map:parameter name="locale" value="de"/>
>     </map:transform>
>     <map:serialize type="html"/>
>    </map:match>
>
> Modified hello.xml:
>
> <?xml version="1.0"?>
> <page xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
>  <title>Hello</title>
>  <content>
>   <para>This is my first Cocoon page!
>   <i18n:text>a_key</i18n:text>
> </para>
>  </content>
> </page>
>
>
> The ident.xsl source code, which simply copies all tags from input to
> output:
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*"/>
>       <xsl:apply-templates/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
>
> I'm also using the message catalogue from the i18n sample. As long as I
have
> only one Xalan transformation everything works fine. But as soon as I add
> another transformation the output gets corrupted. Some (all?) closing tags
> get lost after the i18n transformation. This problem stops when I use the
> old Xalan 2.4.1!
> Does anybody have an idea how to fix this? I can provide a zip file with
the
> modified hello world example, if wanted.
> Thanks
>   Matthias
>
>
>