This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XML document validation using XDR Schema and MSXML.
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: XML document validation using XDR Schema and MSXML.
- From: "Gale, Paul" <GaleP at daugherty dot com>
- Date: Thu, 26 Oct 2000 10:50:39 -0500
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I have a question about what it means to validate an XML document against an
associated Schema. In my case I am using the September 2000 MSXML parser and
an XDR Schema.
I am using an inline schema in my XML document. Using the example document
shown below, how does the element <ROOT> get validated as it must be
declared before the schema definition is seen? Incidentally when I add some
arbitrary element <dummy> to the document inside <Msg> the document
validation still succeeds even though there is no definition of <dummy> in
the inline schema. Why does the validation succeed? I'd expect the
validation to fail in this case but then I suppose the behaviour is
consistent with the fact the no complaint was raised about <ROOT> either.
What's going on here and what is the flaw (if any) in my reasoning? Is this
a bug in MSXML?
The following document is used as an example:
<?xml version=1.0"?>
<ROOT>
<Schema name="mySchema"
xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<!-- schema contents -->
</Schema>
<Msg xmlns:FOO="x-schema:#mySchema">
<MyElements>
<!-- other child elements -->
</MyElements>
<!-- no such element definition in the schema for <dummy> -->
<Dummy/>
</Msg>
</ROOT>
thanks,
Paul
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list