Antwort: RE: [jdom-interest] Namespace help

Li Xu Lxu at copyright.com
Thu Jul 25 07:27:49 PDT 2002


That's why this whole thing is so confusing to me. Elliotte and Bob both said "" is not a namespace, you said "" is a namespace ... Furthermore, if level3 can inherit level2's namespace without a xmlns=, then why didn't level2 do so and inherit level1's namespace thus get rid of xmlns=""?

I guess my original question is still unclear. I'm not having any problem with namespace or the parser. All java objects I have, either a Document or an Element, are exactly correct. The issue is with the Outputter, when it's printing out a XML string why is it outputting 'xmlns=""' when it knows that <level2> is inheriting the namespace form <root_elem> which is in "http://my.com" namespace? 



> -----Original Message-----
> From: Hans Prüller [mailto:hans.prueller at igs.at]
> Sent: Thursday, July 25, 2002 10:10 AM
> To: Li Xu
> Cc: jdom-interest at jdom.org
> Subject: Antwort: RE: [jdom-interest] Namespace help
> 
> 
> 
> i think the level3-element inherits the xmlns="" from level 2.
> 
> so it should be in the ""-namespace.
> 
> hans
> 
> 
> 
>                                                               
>                                                               
>                        
>                     "Li Xu"                                   
>                                                               
>                        
>                     <Lxu at copyright.com        An:     "bob 
> mcwhirter" <bob at werken.com>                                   
>                           
>                     >                         Kopie:  
> "Elliotte Rusty Harold" <elharo at metalab.unc.edu>, 
> <jdom-interest at jdom.org>                   
>                     Gesendet von:             Thema:  RE: 
> [jdom-interest] Namespace help                                
>                            
>                     jdom-interest-admi                        
>                                                               
>                        
>                     n at jdom.org                                
>                                                               
>                        
>                                                               
>                                                               
>                        
>                                                               
>                                                               
>                        
>                     25.07.2002 15:59                          
>                                                               
>                        
>                                                               
>                                                               
>                        
>                                                               
>                                                               
>                        
> 
> 
> 
> > > but XMLOutputter is giving this:
> > >
> > > ===============
> > > ===============
> > > <root_elem xmlns="http://my.com" ....>
> > >        <level2 xmlns="">
> > >                  <level3>xyz</level3>
> > >        </level2>
> > > </root_elem>
> > > ===============
> > >
> > > Notice <level3> is perfectly fine without any namespace?
> > Please tell me what I'm missing here.
> >
> > Right, because <level2> and <level3> are both not in namespaces,
> > and semantically, that's what this document says.
> >
> 
> 
> So why didn't it print <level3 xmlns=""> just like <level2> then?
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com





____________________________________________________
IGS Systemmanagement
GmbH & Co KG
Dorfplatz 5
A-4531 Piberbach
phone: +43 7228 6451 0       home: http://www.igs.at
fax: +43 7228 6451 30        eMail: igs at igs.at
hotline:
fax: +43 7228 6451 20        eMail: hotline at igs.at
____________________________________________________

NEWSFLASH___________________________________________

Personalmanagement ab sofort verfügbar.
Reservieren Sie sich Ihren persönlichen Demotermin
unter igs at igs.at

NEWSFLASH___________________________________________




More information about the jdom-interest mailing list