Creating XSD schema for messages validation Problem
I 'am developing an interface between my system and other system based on XML messages that will be sent over the internet (by web services).
I've created an XSD schema files to define the message structure. I 'am using Microsoft Biztalk to create the sachems and new in this field.
I've build an validation process for the incoming and outgoing messages using the .Net built in functionality (link).
The problem is: sometim开发者_如何学Pythones the validation expect to a namespace before xml node name and sometimes no.
In addition - sometimes for the validation to be succeeded I have to add an attribute to nodes: xmlns=""
and sometimes not.
Can you explain to me the rules about specifying the node father namespace or link to a material?
Thank you in advance.
It could be the XML Schema targetNamespace (ref http://dev.ektron.com/kb_article.aspx?id=426). If the targetNamespace is given, then you need the prefix. When defining a schema, references to defined types, elements and attributes within the schema need a prefix. Of course, references to Schema types need xs: or xsd: prefix, depending on which prefix you are using. I've seen both in common practice.
精彩评论