I have a small but annoying problem, and hope that you can help me out.
I'm working on a programm which reads out xml messages and creates xml messages.
I'm using the XOM package for that. Reading out the XML works fine, validating it is working fine as well. But on creation I got a problem.
The root element of my created XML has to look like that:
The namespace is no problem, I add that in the following way:
But when I want to add the schema-declaration as an attribute:
I get the following error message:
nu.xom.NamespaceConflictException: Attribute prefixes must be declared.
But I don't understand it.
I think I declared the prefix in the attribute ? (xsi:noNamespaceSchemaLocation)
Elliott Rusty Harold writes in his tutorial at www.cafeconleche.org
Attaching a schema is no harder. Just place the necessary xmlns:xsi and xsi:noNamespaceSchemaLocation attributes on the root element.
Didn't I do just that? But it is not working... .
If anyone could shed a light on this I would be really grateful.
I tried the IBM tutorials, the cafeconleche.org tutorials, and various others I found on google, but to no result yet
[ November 28, 2006: Message edited by: Jan Spengen ]