Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

xml schema for unique attribute

$
0
0

Hi, i have xml for a class

<class name="A"><property name="B" /><property name="C" /> </class>

here is my xsd that only can make property-name unique for itself, but also need that it is unique against class-name.

<xs:element name="class"><xs:complexType><xs:sequence><xs:element name="property" maxOccurs="unbounded"><xs:complexType><xs:attribute name="Name" type="xs:String"/></xs:complexType></xs:element></xs:sequence><xs:attribute name="Name" type="xs:String"/></xs:complexType><xs:unique name="uniquepropertyname"><xs:selector xpath="mstns:*"/><xs:field xpath="@name"/></xs:unique></xs:element>


It's hard to be advanced programmer


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>