문제

I'm trying to conditionally change an element from being nillable to non-nillable based on the value of 2 other elements in an XSD . Is this possible in XSD 1.1?

I have 3 simple types of type xs:int : VenGrp, VenTyp, SubVen.

VenGrp and VenTyp are non-nillable SubVen is non-nillable if VenGrp=2 and VenTyp=2 and nillable otherwise.

Is it possible to do this in an XSD schema file?

도움이 되었습니까?

해결책

I don't think so. It would be possible if VenGrp and VenTyp were attributes: you could then use conditional type assignment.

Are you really sure you want to be using xsi:nil anyway? I thought the general consensus was that it was a bad feature best forgotten.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top