You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lars Huttar <la...@sil.org> on 2006/01/25 17:07:13 UTC

Re: CInclude POST (again)

Boisvert, Éric wrote:
> gee thanks for the fix.  being a defensive programmer , I changed the code
> to
>
> private String GetXmlRequest(Document doc)
> {
>   String req = this.DomToString(doc); 
>   if (req.indexOf("xmlns") == -1)
>    { 
>       // not namespace declaration found 
>       Node n = doc.getFirstChild();
>       req.replaceFirst(n.getLocalName(),n.getLocalName() + " " + ns);
>    }
> 	else
>  	return req; 
> }
>   
Seems like you probably don't want the "else". As is, you should get a 
compilation error because GetXmlRequest() will not return anything when 
the if condition is true.

Lars


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org