You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@sundn.de> on 2001/02/28 14:09:24 UTC
[C2]: BUG in current version
Hi,
after some research with the current cvs version of C2 I found a real bug:
If the TraxTransformer is not used inside a pipeline, a NPE is thrown inside the setDocumentLocator method of the org.apache.xalan.transformer.TransformerIdentityImpl class (line 823). (This is at least true if the html, text or xml serializer is used).
You can easily reproduce this, by removing e.g. the <map:transform src="stylesheets/simple-samples2html.xsl"/> from the welcome pipeline.
This bug might be introduced with the removing of the dependecies to the org.apache.xml.serialize package?
Any hints how to fix this ?
Regards
Carsten Ziegeler
Open Source Group sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto:cziegeler@sundn.de
================================================================
AW: [C2]: Problems with Actions and Parameters
Posted by Carsten Ziegeler <cz...@sundn.de>.
> Berin Loritsch wrote:
>
> Ok. I got it fixed, and applied it to the sitemap in the distro.
> It even makes the action-set reusable in many places. This is
> awesome stuff.
>
Great, it works again. Thanks Berin
Carsten
> >
> > Carsten Ziegeler wrote:
> > >
> > > Hi,
> > >
> > > when I use action and parameters in this way:
> > >
> > > <map:match pattern="forms/employee">
> > > <map:act set="employee">
> > > <parameter name="hallo" value="value"/>
> > >
> > > <map:generate type="serverpages" src
> ="docs/samples/forms/employee.xsp"/>
> > > <map:transform src="stylesheets/dynamic-page2html.xsl"/>
> > > <map:serialize/>
> > > </map:act>
> > > </map:match>
> >
> > Unless you are using objectMap variables, this is not necessary anyways.
> >
> > > the generated java code is not compilable:
> > >
> > > param = new Parameters ();
> > > param.setParameter ("hallo", substitute(listOfMaps, "value"));
> > >
> > > if ((map = action_set_employee (cocoon_action, listOfMaps,
> > > environment, objectModel,
> > > substitute(listOfMaps, null),
> param)) != null) {
> > > getLogger().debug("Action action_set_employee");
> > > listOfMaps.add (map);
> > >
> > > .setParameter ("hallo", substitute(listOfMaps, "value"));
> >
> > That is a problem. This is probably a side affect of the change I made
> to key the
> > param value off of an xsl:param. I can change the code so that if the
> parameter
> > is not set, then it won't output the call anyway.
> >
> > > The parameter is processed twice! If the map:generate etc. is used
> outside the map:act the generated code is ok:
> > > <map:act set="employee">
> > > <parameter name="hallo" value="value"/>
> > > </map:act>
> > > <map:generate type="serverpages" src
> ="docs/samples/forms/employee.xsp"/>
> > > <map:transform src="stylesheets/dynamic-page2html.xsl"/>
> > > <map:serialize/>
> > >
> > > I search through the sitemap.xsl for the reason but I think it will
> take me some days to find the problem.
> >
> > Is it being called instead of applied? Let me apply my change, and it
> will get rid of _any_ instance where
> > the parameter is not set.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
Re: [C2]: Problems with Actions and Parameters
Posted by Berin Loritsch <bl...@apache.org>.
Berin Loritsch wrote:
Ok. I got it fixed, and applied it to the sitemap in the distro.
It even makes the action-set reusable in many places. This is
awesome stuff.
>
> Carsten Ziegeler wrote:
> >
> > Hi,
> >
> > when I use action and parameters in this way:
> >
> > <map:match pattern="forms/employee">
> > <map:act set="employee">
> > <parameter name="hallo" value="value"/>
> >
> > <map:generate type="serverpages" src="docs/samples/forms/employee.xsp"/>
> > <map:transform src="stylesheets/dynamic-page2html.xsl"/>
> > <map:serialize/>
> > </map:act>
> > </map:match>
>
> Unless you are using objectMap variables, this is not necessary anyways.
>
> > the generated java code is not compilable:
> >
> > param = new Parameters ();
> > param.setParameter ("hallo", substitute(listOfMaps, "value"));
> >
> > if ((map = action_set_employee (cocoon_action, listOfMaps,
> > environment, objectModel,
> > substitute(listOfMaps, null), param)) != null) {
> > getLogger().debug("Action action_set_employee");
> > listOfMaps.add (map);
> >
> > .setParameter ("hallo", substitute(listOfMaps, "value"));
>
> That is a problem. This is probably a side affect of the change I made to key the
> param value off of an xsl:param. I can change the code so that if the parameter
> is not set, then it won't output the call anyway.
>
> > The parameter is processed twice! If the map:generate etc. is used outside the map:act the generated code is ok:
> > <map:act set="employee">
> > <parameter name="hallo" value="value"/>
> > </map:act>
> > <map:generate type="serverpages" src="docs/samples/forms/employee.xsp"/>
> > <map:transform src="stylesheets/dynamic-page2html.xsl"/>
> > <map:serialize/>
> >
> > I search through the sitemap.xsl for the reason but I think it will take me some days to find the problem.
>
> Is it being called instead of applied? Let me apply my change, and it will get rid of _any_ instance where
> the parameter is not set.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [C2]: Problems with Actions and Parameters
Posted by Berin Loritsch <bl...@apache.org>.
Carsten Ziegeler wrote:
>
> Hi,
>
> when I use action and parameters in this way:
>
> <map:match pattern="forms/employee">
> <map:act set="employee">
> <parameter name="hallo" value="value"/>
>
> <map:generate type="serverpages" src="docs/samples/forms/employee.xsp"/>
> <map:transform src="stylesheets/dynamic-page2html.xsl"/>
> <map:serialize/>
> </map:act>
> </map:match>
Unless you are using objectMap variables, this is not necessary anyways.
> the generated java code is not compilable:
>
> param = new Parameters ();
> param.setParameter ("hallo", substitute(listOfMaps, "value"));
>
> if ((map = action_set_employee (cocoon_action, listOfMaps,
> environment, objectModel,
> substitute(listOfMaps, null), param)) != null) {
> getLogger().debug("Action action_set_employee");
> listOfMaps.add (map);
>
> .setParameter ("hallo", substitute(listOfMaps, "value"));
That is a problem. This is probably a side affect of the change I made to key the
param value off of an xsl:param. I can change the code so that if the parameter
is not set, then it won't output the call anyway.
> The parameter is processed twice! If the map:generate etc. is used outside the map:act the generated code is ok:
> <map:act set="employee">
> <parameter name="hallo" value="value"/>
> </map:act>
> <map:generate type="serverpages" src="docs/samples/forms/employee.xsp"/>
> <map:transform src="stylesheets/dynamic-page2html.xsl"/>
> <map:serialize/>
>
> I search through the sitemap.xsl for the reason but I think it will take me some days to find the problem.
Is it being called instead of applied? Let me apply my change, and it will get rid of _any_ instance where
the parameter is not set.
[C2]: Problems with Actions and Parameters
Posted by Carsten Ziegeler <cz...@sundn.de>.
Hi,
when I use action and parameters in this way:
<map:match pattern="forms/employee">
<map:act set="employee">
<parameter name="hallo" value="value"/>
<map:generate type="serverpages" src="docs/samples/forms/employee.xsp"/>
<map:transform src="stylesheets/dynamic-page2html.xsl"/>
<map:serialize/>
</map:act>
</map:match>
the generated java code is not compilable:
param = new Parameters ();
param.setParameter ("hallo", substitute(listOfMaps, "value"));
if ((map = action_set_employee (cocoon_action, listOfMaps,
environment, objectModel,
substitute(listOfMaps, null), param)) != null) {
getLogger().debug("Action action_set_employee");
listOfMaps.add (map);
.setParameter ("hallo", substitute(listOfMaps, "value"));
The parameter is processed twice! If the map:generate etc. is used outside the map:act the generated code is ok:
<map:act set="employee">
<parameter name="hallo" value="value"/>
</map:act>
<map:generate type="serverpages" src="docs/samples/forms/employee.xsp"/>
<map:transform src="stylesheets/dynamic-page2html.xsl"/>
<map:serialize/>
I search through the sitemap.xsl for the reason but I think it will take me some days to find the problem.
Any hints or ideas?
Carsten
Open Source Group sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto:cziegeler@sundn.de
================================================================
AW: [C2]: BUG in current version
Posted by Carsten Ziegeler <cz...@sundn.de>.
Hey great !
With the latest checkin, upgrading to the latest cvs Xalan and Xerces-1.3.0 the problem seems to have disappeared.
I will proove this further.
Thanks, dims.
Carsten
> -----Ursprungliche Nachricht-----
> Von: Carsten Ziegeler [mailto:cziegeler@sundn.de]
> Gesendet: Mittwoch, 28. Februar 2001 14:09
> An: cocoon-dev@xml.apache.org
> Betreff: [C2]: BUG in current version
>
>
>
> Hi,
>
> after some research with the current cvs version of C2 I found a real bug:
>
> If the TraxTransformer is not used inside a pipeline, a NPE is thrown
> inside the setDocumentLocator method of the
> org.apache.xalan.transformer.TransformerIdentityImpl class (line 823).
> (This is at least true if the html, text or xml serializer is used).
>
> You can easily reproduce this, by removing e.g. the <map:transform src
> ="stylesheets/simple-samples2html.xsl"/> from the welcome pipeline.
>
> This bug might be introduced with the removing of the dependecies to the
> org.apache.xml.serialize package?
>
> Any hints how to fix this ?
>
>
> Regards
> Carsten Ziegeler
>
> Open Source Group sunShine - Lighting up e:Business
> ================================================================
> Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> www.sundn.de mailto:cziegeler@sundn.de
> ================================================================
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>