When I try to validate the XML file I am given this error:
person.xml:3: element person: Schemas validity error : Element
{http://www.namespace.org/person}person: No matching global declaration available for the validation root.
This is the content of the person.xml file:
<?xml version="1.0"?>
<p:person xmlns:p="http://www.namespace.org/person">
<firstName>name</firstName>
<surName>surname</surName>
<secondName>n2</secondName>
</p:person>
This is the content of the person.xsd file:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:p="http://www.namespace.org/person"
version="1.0">
<xs:element name="person">
<xs:complexType>
<xs:group ref="credential"/>
</xs:complexType>
</xs:element>
<xs:group name="credential">
<xs:sequence>
<xs:element name="firstName" type="xs:string"/>
<xs:element name="surName" type="xs:string"/>
<xs:element name="secondName" type="xs:string"/>
</xs:sequence>
</xs:group>
</xs:schema>