I'm having a problem with my XSD where I am getting this error when I enter my code into a XSD validator: "no-xmlns: The {name} of an attribute declaration must not match 'xmlns'."
Here is my XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Test">
<xs:complexType>
<xs:attribute name="xmlns" type="xs:string" use="required"/>
<xs:sequence>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="Screens" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Screen" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="package" type="xs:string" use="required"/>
<xs:attribute name="class" type="xs:string" use="required"/>
<xs:sequence>
<xs:element name="ScreenData" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="step" type="xs:int" use="required"/>
<xs:attribute name="description" type="xs:string" use="required"/>
<xs:sequence>
<xs:element name="element" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="type" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DBSession" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="use_test.properties" type="xs:boolean" use="required"/>
<xs:attribute name="use_dbserver" type="xs:string" use="required"/>
<xs:attribute name="use_db" type="xs:string" use="required"/>
<xs:sequence>
<xs:element name="login" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:attribute name="server" type="xs:string" use="required"/>
<xs:attribute name="database" type="xs:string" use="required"/>
<xs:attribute name="username" type="xs:string" use="required"/>
<xs:attribute name="password" type="xs:string" use="required"/>
<xs:sequence>
<xs:element name="Queries" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:attribute name="query" type="xs:string" use="required"/>
<xs:attribute name="expectedResults" type="xs:string" use="required"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CLISession" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="use_test.properties" type="xs:boolean" use="required"/>
<xs:sequence>
<xs:element name="login" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="host" type="xs:string" use="required"/>
<xs:attribute name="password" type="xs:string" use="required"/>
<xs:attribute name="username" type="xs:string" use="required"/>
<xs:sequence>
<xs:element name="Commands" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="exe" type="xs:string" use="required"/>
<xs:attribute name="args" type="xs:string" use="required"/>
<xs:attribute name="wait" type="xs:int" use="required"/>
<xs:attribute name="expectedOutput" type="xs:string" use="required"/>
<xs:attribute name="toVariable" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I am assuming it is something to do with the second line of code in the schema. This line is related to the following line in my XML document:
<Test xmlns="http://MyURL">