Thursday, April 21, 2011

XSD use="optional"

I have the following:

<xs:attribute name="CarTitleID" type="xs:long" use="optional" />

In my source XML I want to allow people to say

<car CarTitleID="">

And have the XSD not fail. Is this possible?

From stackoverflow
  • IIRC this sort of thing is intended to be handled by nillable types but the implementation is not very practical ultimately.

0 comments:

Post a Comment