Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XML is passing Schema validation when it shoudln't

From: Martin Honnen <mahotrash@-----.-->
To: 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent