XSD Element Not Null or Empty Constraint For Xml?
Try
<xs:element name="lastName" minOccurs="1" nillable="false">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xsd:element name="lastName" type="NonEmptyString" nillable="false"/>
<xsd:simpleType name="NonEmptyString">
<xsd:restriction base="xs:string">
<xsd:minLength value="1" />
<xsd:pattern value=".*[^\s].*" />
</xsd:restriction>
</xsd:simpleType>