xerces J parser overwrites version

H

harihawking

the xml parser associates the attribute list with each type present in
my xml.
It is so haapening that the version attribute present in <?xml
version=1.0> is present in that list for every type in my xml. the
namespace associated with that version attribute is "www.omg.org/
XMI".

I have set the following methods-
setNamespaceAware(true)
setValidating(true).

Can anyone let me know wat the problem is, and the work around?

hari
 
J

Joe Kesselman

Shouldn't be happening in the parser unless your schema or DTD is
asserting a default/fixed version onto those elements. Note that this is
completely independent of the version of XML that you've specified in
the XML declaration.

If turning off validation makes this behavior go away, your DTD or
schema is *definitely* the next thing to check.

After that, I'd check whatever logic you're using Xerces to feed, since
I have real trouble believing that this is a parser bug. Xerces has been
used too long, too widely, for that kind of problem to be likely.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,007
Messages
2,570,266
Members
46,865
Latest member
AveryHamme

Latest Threads

Top