|
47 | 47 | <element ref="ts:cards"/>
|
48 | 48 | <element minOccurs="0" ref="ts:grouping"/>
|
49 | 49 | <element minOccurs="0" ref="ts:ordering"/>
|
50 |
| - <element minOccurs="0" maxOccurs="unbounded" ref="ts:attribute"/> |
| 50 | + <element name="attribute" minOccurs="0" maxOccurs="unbounded" type="ts:attributeWithDistinct"/> |
51 | 51 | <element minOccurs="0" maxOccurs="unbounded" ref="dsig:Signature"/>
|
52 | 52 | </sequence>
|
53 | 53 | <attribute name="custodian" type="boolean" default="false"/>
|
54 | 54 | <attribute name="name" type="NCName"/>
|
| 55 | + <assert test="count(ts:attribute[string(@distinct) = 'true']) le 1"/> |
| 56 | + <assert test="if(not(ts:origins)) then count(ts:attribute[string(@distinct) = 'true']) = 1 else true()"/> |
55 | 57 | </complexType>
|
56 | 58 | <keyref name="typeRef" refer="ts:namedTypeName">
|
57 | 59 | <selector xpath=".//ts:origins/ethereum:event|.//ts:origins/ethereum:call"></selector>
|
|
90 | 92 | <sequence>
|
91 | 93 | <element minOccurs="0" name="label" type="ts:text"/>
|
92 | 94 | <element minOccurs="0" ref="ts:origins"/>
|
93 |
| - <element minOccurs="0" maxOccurs="unbounded" ref="ts:attribute"/> |
| 95 | + <element name="attribute" minOccurs="0" maxOccurs="unbounded" type="ts:attribute"/> |
94 | 96 | <element minOccurs="0" maxOccurs="unbounded" ref="ts:selection"/>
|
95 | 97 | <!-- consider putting input and output in transaction
|
96 | 98 | declaration later when/if DvP Security is
|
|
253 | 255 | <attribute name="field" use="required" type="NCName"/>
|
254 | 256 | </complexType>
|
255 | 257 | </element>
|
256 |
| - <element name="attribute"> |
257 |
| - <complexType> |
258 |
| - <sequence> |
259 |
| - <element name="type"> |
260 |
| - <complexType> |
261 |
| - <sequence> |
262 |
| - <element name="syntax"/> |
263 |
| - </sequence> |
264 |
| - </complexType> |
265 |
| - </element> |
266 |
| - <!-- label is not needed if the attribute is only used for selection --> |
267 |
| - <element minOccurs="0" name="label" type="ts:text"/> |
268 |
| - <element ref="ts:origins"/> |
269 |
| - </sequence> |
270 |
| - <attribute name="name" use="required" type="NCName"/> |
271 |
| - <attribute name="distinct" type="boolean" default="false"/> |
272 |
| - <attribute name="oid" type="NMTOKEN"/> |
273 |
| - </complexType> |
274 |
| - </element> |
| 258 | + <complexType name="attribute"> |
| 259 | + <sequence> |
| 260 | + <element name="type"> |
| 261 | + <complexType> |
| 262 | + <sequence> |
| 263 | + <element name="syntax"/> |
| 264 | + </sequence> |
| 265 | + </complexType> |
| 266 | + </element> |
| 267 | + <!-- label is not needed if the attribute is only used for selection --> |
| 268 | + <element minOccurs="0" name="label" type="ts:text"/> |
| 269 | + <element ref="ts:origins"/> |
| 270 | + </sequence> |
| 271 | + <attribute name="name" use="required" type="NCName"/> |
| 272 | + <attribute name="oid" type="NMTOKEN"/> |
| 273 | + </complexType> |
| 274 | + <complexType name="attributeWithDistinct"> |
| 275 | + <complexContent> |
| 276 | + <extension base="ts:attribute"> |
| 277 | + <attribute name="distinct" type="boolean" default="false"/> |
| 278 | + </extension> |
| 279 | + </complexContent> |
| 280 | + </complexType> |
275 | 281 | <simpleType name="syntax">
|
276 | 282 | <restriction base="NMTOKEN">
|
277 | 283 | <enumeration value="1.3.6.1.4.1.1466.115.121.1.7"/><!-- Boolean -->
|
|
0 commit comments