[jdom-interest] Namespace issues, et al.
bob mcwhirter
bob at werken.com
Sun Feb 23 17:43:35 PST 2003
> Ok, I misunderstood you guys. I thought you were saying that I had to
> change all that
> to <jbase:request jbase:session=""/>. The point I was trying to make is
> that it is perfectly valid
> (though my personal Schema says not to allow it) for <jbase:request
> yourname:session=""/>. What I was
> trying to say about the spec was that <request session=""/> puts 'session'
> into the namespace of the 'request'
> element (as opposed to the 'yourname' namespace above), thus not needing to
> explicitely put jbase:session...
No no no. That's still a false statement. The 'session' attribute
is -NOT- in the namespace of the <request> element, but it is in the
locality of it.
> As far as your question, you can read it, but not create or validate it.
>
> If you try to create that document, you get one of two scenarios...
> 1) every element says xmlns="http://www.temporal-wave.com/spec" (thus, lots
> of overhead over the network)
The outputter/serializer should remove gratuituous ns-decls. But even it
doesn't, it's still producing valid/well-formed XML.
> 2) the top element says that, the next one says xmlns="", and then
> everything inside that doesn't show xmlns at all.
Though, are your inner elements in the empty namespace? Or did you
create them in your namespace?
> Thus, my original request to quit adding xmlns="", as that disables the
> current namespace and sets it to null. Thus,
> every items inside that is invalid.
I have a sneaking suspicioun that JDOM is doing exactly the correct thing.
> On the validation side... if I try to validate it as done on the JDOM FAQ
> (or on the various suggestions from the list),
> I get a ClassCastException in Xerces. If I use Xerces directly, it
> correctly validates. Read a few emails ago, there was
> a link to the bug report I submitted to Apache....
JAXP and Xerces have lots of class-cast exceptions. Blame sun.
-bob
More information about the jdom-interest
mailing list