cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tuomo L <>
Subject RE: getxml in XSP throws NPE if @path is invalid
Date Wed, 15 Oct 2003 07:14:22 GMT
Hi Carsten,

I'd say null is the way to go, no matter what @as is. Isn't empty
DocumentFragment just like an empty string? Empty string is still a
string, and sometimes usefull in XSP.

So, returning null if:

@path does not exist in the session context (or @path is an empty string)
@path does not exits as an attribute


On Tue, 14 Oct 2003, Carsten Ziegeler wrote:

> Antonio Gallardo wrote:
> >
> > Antonio Gallardo dijo:
> > > Please comment if this works for you. I am not sure if this will work,
> > > since Carsten did changes in the Helperclass in order to helps you.
> >
> > Hi, I am again!
> >
> > Sometimes I am lazy! :-D But I decided to check the Helperclass mentioned
> > in my last mail:
> >
> > The Carsten's change is if the value of @path does not exists, then
> > instead of return null, it will return a emptry String ("").
> >
> > I am not sure if this will meet your request since there are 2 diferents
> > objects to be returned:
> >
> > If there is a value at @path, then as="object" returns a DocumentFragment
> > If there is NOT a value, then it will return a String "".
> >
> > I don't like the idea. But I am not a Java guru. I think we need to revert
> > the change to allow return null again. What you think?
> >
> Ok, you're right. I think returning either null or an empty DocumentFragment
> is the way to go. I can change it in any way, but as I'm not a user of XSP
> I don't know which solution is better for developing XSP. Just tell and
> I will change it the way you want.
> Carsten

View raw message