Thanks for answering, but maybe I should have led with my disclaimer:
I'm a newbie to XML, primarily program in SAS, and consulted online
documentation.
Some of my confusion stems from the way terms such as empty, missing,
null, and blank are used/handled in different languages. I don't mind
reading docs, but I can't find an answer I understand at
http://www.w3.org/ or url links I've found.
I don't want to create an empty element, but need to know under what
circumstances an empty element will pass schema checks, so that the
backend processing in SAS can react correctly when it's time to load
the data. There are 5 SAS programmers sharing responsibility for
writing the load routines and I was chosen to explain what to expect
after validation. There might be circumstances where an empty element
is allowed and others where we want to reject the file, both based on
the same element, depending upon the XML file provider or segment.
There are 4 levels of schema involved. Here's an example of an element
in the Level 3 schema:
<xs:element name="MOM">
<xs:annotation>
<xs:documentation>Mother</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="25"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
I understand that because of minLength this element must have at least
one character. In a simple test, whitespace <MOM> </MOM> passes (is
this a blank in XML?) whereas <MOM></MOM> doesn't (null or empty?). An
element defined with type=xs:integer fails in both circumstances.
Is there any type (or attribute?) where both <MOM></MOM> and <MOM>
</MOM> passes validation? Or must an element be explicitly defined as
permitting Empty(nil?) values? Or must I test each unique element?
I hope this makes sense.