Jump to content

DTD/Schema not validating


lldonn
 Share

Recommended Posts

Hi my xml file is shown below, everytime i try to validate it i get this error:error code:10728980207error reason: The attribute {xmlns}sml on this element is not defined in the DTD/Schemaerror line: 16Does anyone have any idea how to get rid of this error and validate the file successfully, there is a problem with my <sml:grid xmlns:sml="http://www.w3.org/TR/WD-XS/sml"> Im not sure how to define the xmlns in my dtd/schema, is this the correct line to use??Any help would much appreciated.THANKS.The XML File with DTD/Schema is shown Below:<?xml version="1.0" ?><!DOCTYPE sml:grid[<!ELEMENT sml:grid (sml:row+)><!ELEMENT sml:row (sml:largesquare+)><!ELEMENT sml:largesquare (sml:smallrow+)><!ELEMENT sml:smallrow (sml:smallsquare+)><!ELEMENT sml:smallsquare (#PCDATA)><!ATTLIST sml:row id (1|2|3) #REQUIRED><!ATTLIST sml:largesquare squareno (1|2|3|4|5|6|7|8|9) #REQUIRED><!ATTLIST sml:smallrow rowid (1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27) #REQUIRED><!ATTLIST sml:smallsquare cellid (1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81) #REQUIRED answer (1|2|3|4|5|6|7|8|9) #REQUIRED>]><?xml-stylesheet type="text/xsl" href="gridy.xsl"?><sml:grid xmlns:sml="http://www.w3.org/TR/WD-XS/sml"> <sml:row id="1"> <sml:largesquare squareno="1"> <sml:smallrow rowid="1"> <sml:smallsquare cellid="1" answer="3">3</sml:smallsquare> <sml:smallsquare cellid="2" answer="9"></sml:smallsquare> <sml:smallsquare cellid="3" answer="8"></sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="2"> <sml:smallsquare cellid="4" answer="2"></sml:smallsquare> <sml:smallsquare cellid="5" answer="4">4</sml:smallsquare> <sml:smallsquare cellid="6" answer="5"></sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="3"> <sml:smallsquare cellid="7" answer="6"></sml:smallsquare> <sml:smallsquare cellid="8" answer="1"></sml:smallsquare> <sml:smallsquare cellid="9" answer="7"></sml:smallsquare> </sml:smallrow> </sml:largesquare> <sml:largesquare squareno="2"> <sml:smallrow rowid="4"> <sml:smallsquare cellid="10" answer="1"></sml:smallsquare> <sml:smallsquare cellid="11" answer="6">6</sml:smallsquare> <sml:smallsquare cellid="12" answer="5">5</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="5"> <sml:smallsquare cellid="13" answer="7"></sml:smallsquare> <sml:smallsquare cellid="14" answer="8"></sml:smallsquare> <sml:smallsquare cellid="15" answer="9">9</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="6"> <sml:smallsquare cellid="16" answer="3">3</sml:smallsquare> <sml:smallsquare cellid="17" answer="2"></sml:smallsquare> <sml:smallsquare cellid="18" answer="4"></sml:smallsquare> </sml:smallrow> </sml:largesquare> <sml:largesquare squareno="3"> <sml:smallrow rowid="7"> <sml:smallsquare cellid="19" answer="7">7</sml:smallsquare> <sml:smallsquare cellid="20" answer="4">4</sml:smallsquare> <sml:smallsquare cellid="21" answer="2">2</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="8"> <sml:smallsquare cellid="22" answer="3">3</sml:smallsquare> <sml:smallsquare cellid="23" answer="6"></sml:smallsquare> <sml:smallsquare cellid="24" answer="1">1</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="9"> <sml:smallsquare cellid="25" answer="8">8</sml:smallsquare> <sml:smallsquare cellid="26" answer="9"></sml:smallsquare> <sml:smallsquare cellid="27" answer="5">5</sml:smallsquare> </sml:smallrow> </sml:largesquare> </sml:row> <sml:row id="2"> <sml:largesquare squareno="4"> <sml:smallrow rowid="10"> <sml:smallsquare cellid="28" answer="7"></sml:smallsquare> <sml:smallsquare cellid="29" answer="3">3</sml:smallsquare> <sml:smallsquare cellid="30" answer="9"></sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="11"> <sml:smallsquare cellid="31" answer="5">5</sml:smallsquare> <sml:smallsquare cellid="32" answer="8"></sml:smallsquare> <sml:smallsquare cellid="33" answer="4">4</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="12"> <sml:smallsquare cellid="34" answer="1">1</sml:smallsquare> <sml:smallsquare cellid="35" answer="6"></sml:smallsquare> <sml:smallsquare cellid="36" answer="2"></sml:smallsquare> </sml:smallrow> </sml:largesquare> <sml:largesquare squareno="5"> <sml:smallrow rowid="13"> <sml:smallsquare cellid="37" answer="8"></sml:smallsquare> <sml:smallsquare cellid="38" answer="5"></sml:smallsquare> <sml:smallsquare cellid="39" answer="1"></sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="14"> <sml:smallsquare cellid="40" answer="6">6</sml:smallsquare> <sml:smallsquare cellid="41" answer="7">7</sml:smallsquare> <sml:smallsquare cellid="42" answer="2">2</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="15"> <sml:smallsquare cellid="43" answer="9"></sml:smallsquare> <sml:smallsquare cellid="44" answer="4"></sml:smallsquare> <sml:smallsquare cellid="45" answer="3"></sml:smallsquare> </sml:smallrow> </sml:largesquare> <sml:largesquare squareno="6"> <sml:smallrow rowid="16"> <sml:smallsquare cellid="46" answer="6"></sml:smallsquare> <sml:smallsquare cellid="47" answer="2"></sml:smallsquare> <sml:smallsquare cellid="48" answer="4">4</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="17"> <sml:smallsquare cellid="49" answer="9">9</sml:smallsquare> <sml:smallsquare cellid="50" answer="1"></sml:smallsquare> <sml:smallsquare cellid="51" answer="3">3</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="18"> <sml:smallsquare cellid="52" answer="5"></sml:smallsquare> <sml:smallsquare cellid="53" answer="7">7</sml:smallsquare> <sml:smallsquare cellid="54" answer="8"></sml:smallsquare> </sml:smallrow> </sml:largesquare> </sml:row> <sml:row id="3"> <sml:largesquare squareno="7"> <sml:smallrow rowid="19"> <sml:smallsquare cellid="55" answer="8">8</sml:smallsquare> <sml:smallsquare cellid="56" answer="7"></sml:smallsquare> <sml:smallsquare cellid="57" answer="1">1</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="20"> <sml:smallsquare cellid="58" answer="4">4</sml:smallsquare> <sml:smallsquare cellid="59" answer="5"></sml:smallsquare> <sml:smallsquare cellid="60" answer="6">6</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="21"> <sml:smallsquare cellid="61" answer="9">9</sml:smallsquare> <sml:smallsquare cellid="62" answer="2">2</sml:smallsquare> <sml:smallsquare cellid="63" answer="3">3</sml:smallsquare> </sml:smallrow> </sml:largesquare> <sml:largesquare squareno="8"> <sml:smallrow rowid="22"> <sml:smallsquare cellid="64" answer="4"></sml:smallsquare> <sml:smallsquare cellid="65" answer="3"></sml:smallsquare> <sml:smallsquare cellid="66" answer="6">6</sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="23"> <sml:smallsquare cellid="67" answer="2">2</sml:smallsquare> <sml:smallsquare cellid="68" answer="9"></sml:smallsquare> <sml:smallsquare cellid="69" answer="8"></sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="24"> <sml:smallsquare cellid="70" answer="5">5</sml:smallsquare> <sml:smallsquare cellid="71" answer="1">1</sml:smallsquare> <sml:smallsquare cellid="72" answer="7"></sml:smallsquare> </sml:smallrow> </sml:largesquare> <sml:largesquare squareno="9"> <sml:smallrow rowid="25"> <sml:smallsquare cellid="73" answer="2"></sml:smallsquare> <sml:smallsquare cellid="74" answer="5"></sml:smallsquare> <sml:smallsquare cellid="75" answer="9"></sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="26"> <sml:smallsquare cellid="76" answer="1"></sml:smallsquare> <sml:smallsquare cellid="77" answer="3">3</sml:smallsquare> <sml:smallsquare cellid="78" answer="7"></sml:smallsquare> </sml:smallrow> <sml:smallrow rowid="27"> <sml:smallsquare cellid="79" answer="4"></sml:smallsquare> <sml:smallsquare cellid="80" answer="8"></sml:smallsquare> <sml:smallsquare cellid="81" answer="6">6</sml:smallsquare> </sml:smallrow> </sml:largesquare> </sml:row></sml:grid>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...