[erlang-questions] Problem with XML validation using xmerl_xsd:validate().
Fri Jan 2 10:45:37 CET 2009
The string datatype in XML Schema can be zero length. So by default
the text value of an XSD string is optional.
Thus from what I can see of your example, in my gmail, is valid. If
you have valid results from other validating parsers I would assume it
is likely valid.
I tried it with XSV just to see if there was something I overlooked.
Looks like a bug.
On Tue, Dec 30, 2008 at 2:15 PM, Robert Raschke <rtrlists@REDACTED> wrote:
> 2008/12/30 Andrey Sedinin <sedinin@REDACTED>:
>> Of course i have tested this case:
>> It does not work too (or it work with the same result :).
>> But in XML it is equivalent:
>> <status></status> =:= <status/>
>> But any way -- thank you for your guessing.
> I don't know very much about XML and schemas, but is it actually
> possible to distinguish an empty text content from a non-existant one
> (that would be kind of like "" == NULL)? I mean the text, not the
> presence of the node itself.
> If empty == non-existant then I don't think you can easily represent
> that in a schema. But, as I say, I am not an expert.
> Do schemas not allow you to state that text content of a node is optional?
> erlang-questions mailing list
More information about the erlang-questions