Target Namespace of an attribute declaration must not match XMLShema-instance

Posted on 2006-04-11
Last Modified: 2013-11-19
I'm new to XML and I've run into the following error (I'm using oXygen):

SystemID: \Desktop\XML Import2\xsi.xsd
Location: 6:40
Description: no-xsi: The {target namespace} of an attribute declaration must not match ''.

Below is a copy of the XSD document "xsi.xsd"

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="" elementFormDefault="qualified"
  <xs:import namespace=""
  <xs:import namespace=""
  <xs:import namespace=""
  <xs:attribute name="schemaLocation"/>

Can you point me in the right direction?
Question by:Conkshell
    1 Comment
    LVL 60

    Accepted Solution

    Hi Conkshell,
    > targetNamespace=""

    you cannot do that,
    if you give the document a targetNamespace equal to the schema-instance namespace,
    you are sort of overwriting that namespace, and you need it (though you only need it in the instance, not in the schema)

    in targetNamespace, you should give the name of this specific schema's namespace
    (actually this says, invent yourself a name, just make sure it is unique)

    targetNamespace="urn:org:Conkshell:schemas:first-trial-schema" would work


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
    Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now