> WRONG: It is actually traversing all the children and
> setting the namespace (adding the attribute xmlns=""
> to every "servlet" element).

You have specified a default namespace for the parent but you have 
not specified a namespace for the children, so when outputting this 
model the default namespace needs to be undeclared for any child 
elements which are in no namespace. 

That's why the child elements have the xmlns="" declaration.

Regards,
Edwin

On 5/8/05, George Van Treeck <[EMAIL PROTECTED]> wrote:
> Wrong and right!
> 
> WRONG: It is actually traversing all the children and
> setting the namespace (adding the attribute xmlns=""
> to every "servlet" element).
> 
> RIGHT: It should not be doing that. How do I make it
> stop doing that?
> 
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> version="2.4"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>   <servlet xmlns="">
>            ^^^^^^^^
>            Why is it inserting the above xmlns=""?
> 
> -George
> 
> --- Edwin Dankert <[EMAIL PROTECTED]> wrote:
> > Setting a namespace on an element does not traverse
> > it's children.
> >
> > You will have to set the namespace explicitly for
> > every (child)
> > element that's in
> > this namespace.
> >
> > Regards,
> > Edwin
> >
>


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to