开发者

XML Schema elements supported subset: truth or fake?

During these days I had to develop applications involved in xml schemas definitions. Well, I work with certain system and technologies, most of these are Microsoft related resources, and I could learn that not all xml entities are supported by xml parsers and other tools available in the development world.

For example, I know that DataContractSerializer is not able to handle xml attributes.

Well, browsing the web I could understand that it is not only attributes, but today available tools do not support all the entities inside an xml, in fact, tools like Xsd.exe by Microsoft or its DataCont开发者_JS百科ractSerializer always generates xml schemas using, verbatim:

A subset of the most supported elements in the xml schema standard specification

1) Well, my question is: is this information true? 2) Is it true that many elements in xsd are not supported by present development tools? 3) If it is true, what is the smallest subset of xsd elements supported by all tools available today?

Thankyou


I know of some tools that support only a tiny subset of XSD, but the remedy is to avoid those tools (like most other people do). So there's no real answer to your question. Most mainstream XSD validators (as distinct from data binding tools) support everything in the spec except edge cases: but they vary on what they consider edge cases. Altova, for example, does not enforce the Unique Particle Attribution constraint; Microsoft (I believe) support their own regex dialect rather than the one defined in the W3C spec.

Data binding tools are a bit different, because they have the challenge of mapping XSD constructs to things in some other type system, and depending on what that other type system is, some of the constructs don't map easily. Many data binding tools, I'm told, have problems with mixed content.

I've no idea what "DataContractSerializer" is, but if it really doesn't handle XML attributes then it looks like something to avoid.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜