如何在visual studio 2010中使用xsd 1.1

如何在visual studio 2010中使用xsd 1.1

问题描述:

如何在Visual Studio 2010中验证xsd 1.1



< xs:element name =producttype =ProductType>

< xs:alternative test =@ dept ='ACC'type =AccessoryType/>

< xs:alternative test =@ dept ='WMN'或@ dept ='MEN'

type =ClothingType/>







错误:在此上下文中不支持'http://www.w3.org/2001/XMLSchema:alternative'元素。



我尝试了什么:



我在visual studio 2015中尝试过,但错误是一样的。

How to validate xsd 1.1 in Visual Studio 2010

<xs:element name="product" type="ProductType">
<xs:alternative test="@dept='ACC'" type="AccessoryType"/>
<xs:alternative test="@dept='WMN' or @dept='MEN'"
type="ClothingType"/>



Error : The 'http://www.w3.org/2001/XMLSchema:alternative' element is not supported in this context.

What I have tried:

I have tried in visual studio 2015 but error is same.

你没有。不支持XSD 1.1。



为了使用它,你需要一个第三方库,其中没有一个便宜或免费,或者你自己支持它,这不是一件小事。
You don't. XSD 1.1 isn't supported.

In order to use it you need either a 3rd party library, none of which are cheap or free, or write your own support for it, which isn't trivial.