XSD - Element required, Matching Values, empty Allowed
I'm new to XSD and this is probably a simple question. In the snippet below -
the element TOBACCO_USE.
The element is REQUIRED to be present, but the value may be empty. If it is populated,
it must have a value of YES, NO or UNKNOWN.
I'm not sure how to specify this combination of requirements.
i.e. I think that "sequence" says the element must be present.
But when I specify a pattern value - how is it known that empty is allowed? And what would be the difference if empty were not allowed?