Re: [xml] XML Schema: Nillable custom type error (PATCH)
- From: Kasimier Buchcik <K Buchcik 4commerce de>
- To: Sir Woody Hackswell <woody hackswell com>
- Cc: ML-libxml2 <xml gnome org>
- Subject: Re: [xml] XML Schema: Nillable custom type error (PATCH)
- Date: Mon, 07 Nov 2005 10:52:02 +0100
Hi,
On Sat, 2005-11-05 at 20:23 -0500, Sir Woody Hackswell wrote:
Hello, all! I believe I've come across a problem with Schema validation.
Here's my scenario:
I have a custom type (in this example, "pricetype". My Element is
nillable, but the validator always bombs on it, because the "" item
isn't in my xs:pattern list. Nillable should hit before we check
patterns, no? Below my example is a small patch. Thank you.
[...]
The current behaviour of the processor is correct in this case.
You need to set the xsi:nil attribute to "true" in the instance in order
to activate the "nillable" mechanism.
Example:
<Price xsi:nil="true"/>
The relevant spec pieces:
http://www.w3.org/TR/xmlschema-1/#xsi_nil
http://www.w3.org/TR/xmlschema-1/#cvc-elt
Regards,
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]