ADES-attic / xsd

XML Schema (W3C)
0 stars 0 forks source link

Empty or all whitespace element content in required fields. #1

Closed skeys closed 9 years ago

skeys commented 9 years ago

Empty or all whitespace element content in required fields should probably be disallowed for compatibility with PSV. The current schema allows an empty XML element as a "required" field, but this would most logically convert to a blank PSV fields which would then be disallowed for a required field.

A fix might be a non-blank type using a pattern.

skeys commented 9 years ago

Addressed with https://github.com/IAU-ADES/xsd/commit/bed7bbb33b50a8eb2f39db40f34fea915d93e1f4 (accidentally pushed straight to master instead of a branch. Edit: at first. moved to branch now. Hope that didn't cause any problems.)

The previous example.xml failed to validate with this new .xsd because it had empty elements. The new example.xml with elements filled validates okay. Also tested were elements of all whitespace, just a pipe character, and whitepace around a pipe character. These cases all fail validation.