[erlang-questions] Problem with XML validation using xmerl_xsd:validate().

Robert Raschke <>
Tue Dec 30 14:15:59 CET 2008


2008/12/30 Andrey Sedinin <>:
> Hi
>
> Of course i have tested this case:
>
> <status></status>
>
> 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?

Robby



More information about the erlang-questions mailing list