[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XML document validation using XDR Schema and MSXML.
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|