Novice Schema Question, Please Help.

wxdqz

New Member
Hi all!I am trying to phase out some old DTDs and transform them to XML Schemas.My question is as follows:If you submit a XML node that is not in a DTD, an error occurs statingthatyou cannot have that node. When I did a little test with XML Schemas,itlet me put in extra nodes , etc. without throwing an error.Can someone look at the following and let me know if I am doing itcorrectly,and if this should throw an error because of the added <TEST/> element?I have been through the following <!-- m --><a class="postlink" href="documentationhttp://msdn.microsoft.com/library/psdk/xmlsdk/xmlp10rw.htmand">documentationhttp://msdn.microsoft.com/ ... 0rw.htmand</a><!-- m --> still cannot make the parser throw and error...I am using IE 5.5Thanks in advance for your help!Mike <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> testschema.xml:<?xml version="1.0"?><Schema name="schema_sample_1"xmlns="urn:schemas-microsoft-com:xml-data"xmlns:dt="urn:schemas-microsoft-com:datatypes"><ElementType name="PERSONA" content="textOnly" model="closed"/><ElementType name="GRPDESCR" content="textOnly" model="closed"/><ElementType name="PGROUP" content="eltOnly" model="closed"><element type="PERSONA" minOccurs="1" maxOccurs="*"/><element type="GRPDESCR" minOccurs="1" maxOccurs="1"/></ElementType></Schema>file test.xml:<?xml version="1.0" ?><PGROUP xmlns="x-schema:testschema.xml"><PERSONA>MACBETH</PERSONA><PERSONA>BANQUO</PERSONA><GRPDESCR>generals of the king's army.</GRPDESCR><TEST>hello</TEST></PGROUP>
 
Back
Top