No Schema or DTD associated....

This should cover W3C XML Schema, Relax NG and DTD related problems.
Posts: 2

No Schema or DTD associated....

Mon Nov 03, 2014 7:30 am

Hi all,

I am trying to validate my xml schema and it's not working. The error that keeps coming up is "There is no schema or DTD associated with this document..." I am trying to validate it against an xsd document. This is for a project at my university and I am in the process of learning xml, but I can't get past this. Please help me! Many many thanks in return!

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="PoliticalLeader.xsd" media="screen"?>
<report> xmlns:xsi=""
   <report>Tracking Report</report>
         <leadername>Nawaz Sharif</leadername>
         <role>Prime Minister</role>
         <party >Democratic Islamic Party </party>
            <info>Build more parks inside Pakistan to improve conditions </info>
      <countryname>United States</countryname>
         <leadername>Condoleeza Rice</leadername>
         <role>Secretary of State</role>
         <party>Republican Party</party>
            <info>Making more parks won’t help any living conditions and it is pointless to do so. </info>
            <info>Fund Pakistan’s plan to build more parks in their country </info>
Posts: 2471

Re: No Schema or DTD associated....

Mon Nov 03, 2014 11:07 am


It looks like you've accidentally associated the schema as a stylesheet instead of a schema.
You must associate a schema with your document: menu > Document > Schema > Associate Schema and browse for the schema. The schema type will be automatically detected and selected in the combo. This will specify the schema URI and namespace on the root of the XML document.

Code: Select all

<report xmlns:xsi=""

Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 1 guest