SV: SV: SV: [jdom-interest] How do you do it in JDOM?
Elliotte Rusty Harold
elharo at metalab.unc.edu
Tue Feb 17 20:16:14 PST 2004
At 12:22 AM +0100 2/18/04, Per Norrman wrote:
>Ok,
>
>Xerces and Crimson reports the namespace URI for the xml prefix.
Xerces does this? Are you sure? Which version? Is this through the
SAX API or something else. I could swear I just tested this yesterday
in a different (still SAx context) and Xerces was not reporting it
while Crimson was.
>JDOM checks that the namespace URI really is the correct URI, and
>barfs if not. XOM (Elliotte's API*) just ignores the namspace URI
>for the xml prefix (at least that's the impression I get from code),
>so your stuff would probably work there.
I don't think XOM does that. If it does, it's a bug. XOM is very
careful about where and when the xml prefix is mapped. If you can
reproduce a case in which XOM ignores the namespace URI for the xml
prefix let me know so I can fix it. Or maybe you just meant XOM won't
add a namespace declaration for the xml prefix? That's true. However,
if you try to use the wrong URI or the wrong prefix, XOM should toss
an exception.
--
Elliotte Rusty Harold
elharo at metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
More information about the jdom-interest
mailing list