Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] confused by Namespaces

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Luca Passani <passani AT eunet.no>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] confused by Namespaces
  • Date: Tue, 24 May 2005 09:06:20 -0400

It sounds like you have some elements that are in namespaces and elements that are not. Possibly you have some documents that use the XHTML namespace and some that are simply HTML without namespaces. XOM always preserves namespaces or lack thereof, unless you explicitly change them.

You need to stop thinking of namespaces as a function of which attributes appear where and think of them as intrinsic properties of elements. Moving an element from one document to another does not change its namespace any more than it changes its name.

In your own code and documents, you need to be crystal clear about which elements are in which namespaces and which elements are in no namespace at all.

There may be an additional issue pricking you in particular: TagSoup reports all elements in no namespace as being in the XHTML namespace whether they actually are or not.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page