You don't have to validate a schema alone. When an XML file is validated, the shcema will be loaded first. If there is any problems in the schema, error messages will be displayed, however, below the content of the XML file rather than that of the shcema file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whenever I am trying to validate my XML-Schema or my XML-File XML Copy Edior says no declaration found for element 'xs:schema'
Code for PODCAST.xsd:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementformdefault="qualified"> <xs:element name="podcast"> <xs:complextype name="podcast"> <xs:sequence> <xs:element maxoccurs="unbounded" type="xs:string" name="episode" minoccurs="0"> <xs:complextype name="episode"> <xs:element name="host"> <xs:element name="guest"> <xs:element name="chapter"> </xs:element> </xs:element> </xs:element> </xs:complextype> </xs:element></xs:sequence> </xs:complextype> </xs:element> </xs:schema>and the following file: podcast-project.xml
<podcast xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.meinpodcast.de/" xsi:schemalocation="https://www.meinpodcast.de/ PODCAST.xsd"> <episode> <host> </host> <guest> </guest> <chapter></chapter> </episode> </podcast>You don't have to validate a schema alone. When an XML file is validated, the shcema will be loaded first. If there is any problems in the schema, error messages will be displayed, however, below the content of the XML file rather than that of the shcema file.