Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XML is passing Schema validation when it shoudln't [Thread Next] Re: XML is passing Schema validation when it shoudln'tTo: NULL Date: 11/3/2008 1:14:00 PM Christopher wrote: > I don't understand why my XML doc is passing validation when it > shoudln't. > I also don't understand these namespaces and why some examples use one > or another. > I just want to dictate the variable types that are allowed in > different fields and I can't seem to accomplish that. > > --------------------------------------------------------------------------- > schema: > > <?xml version="1.0" encoding="utf-8" ?> > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:dt='urn:schemas-microsoft-com:datatypes'> > > <xsd:element name="economy"> > <xsd:complexType> > <xsd:sequence> > <!-- Good Elements --> > <xsd:element name="good" minOccurs="1" > maxOccurs="unbounded"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="name" dt:type="string"/> > <xsd:element name="value" dt:type="float"/> > <xsd:element name="tech" dt:type="i4"/> Your schema seems to be a mixture of the W3C XML schema language and the old MS XDR schema language. I would not use that, I have no idea whether the MS XML parser supports such a mixture. Consider to forget about the XDR language, it is no longer supported in the latest MS parser implementations (like MSXML 6 or .NET 2.0's XmlReader). The W3C XML schema language has been standardized 2001 and has good support by Microsoft and other implementors (e.g. Apache Xerces). -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
