The requirements for qualification in instance documents depend not only on the default forms, but on the scope of the schema declarations. This is a confusing aspect of the schema specification. I think you'll have the best chance of a meaningful explanation of the problem you're having if you attach a schema and an instance document that demonstrate it. (Or you may find that the process of producing a minimal test case allows you to find the problem yourself.)
You shouldn't need to specify that the default forms are unqualified; that's the default for both elements and attributes. -----Original Message----- From: paul.band...@nomura.com [mailto:paul.band...@nomura.com] Sent: Friday, May 15, 2009 5:22 AM To: c-users@xerces.apache.org Subject: Name-space problem - counter-intuitive "<element> should be un-qualified" error... Hi, I'm a relative newcomer using xerces 2.8/xalan 1.10. I have been successful in using xerces to parse and validate documents with a schema that have been previously validating fine in a Java environment. But to do this I needed to add a namespace prefix and targetNamespace elements to the schema, and the corresponding namespace declaration in the document. However the client systems that are currently in production don't expect to use the namespace declaration and prefix so I have been trying to identify the minimum change. Based on what I have read about namespaces I am lead to believe that in the instance documents I should be able to identify the schema namespace without giving it a prefix - e.g. in the Schema the namespace is declared:- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.nomura.com/Transaction" targetNamespace="http://www.nomura.com/Transaction" elementFormDefault="unqualified" attributeFormDefault="unqualified" > ... And an instance document uses the declaration:- <Transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns=http://www.nomura.com/Transaction> However when the parser encounters the first element: <LegalEntity v='xxx'/> The following error is produced:- Element 'LegalEntity' should be un-qualified It's unclear what this error is attempting to communicate as clearly the element name _is_ un-qualified. What is the parser trying to tell me? Regards, Paul Bandler Nomura International Plc +44 (0)20 7521 3628 paul.band...@uk.nomura.com This e-mail (including any attachments) is confidential, may contain proprietary or privileged information and is intended for the named recipient(s) only. Unintended recipients are prohibited from taking action on the basis of information in this e-mail and must delete all copies. Nomura will not accept responsibility or liability for the accuracy or completeness of, or the presence of any virus or disabling code in, this e-mail. If verification is sought please request a hard copy. Any reference to the terms of executed transactions should be treated as preliminary only and subject to formal written confirmation by Nomura. Nomura reserves the right to monitor e-mail communications through its networks (in accordance with applicable laws). No confidentiality or privilege is waived or lost by Nomura by any mistransmission of this e-mail. Any reference to "Nomura" is a reference to any entity in the Nomura Holdings, Inc. group. Please read our Electronic Communications Legal Notice which forms part of this e-mail: http://www.Nomura.com/email_disclaimer.htm