[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML Help
- From: Francis Norton <francis@redrice.com>
- To: "Saxena, Saurabh" <saurabh.saxena@intel.com>
- Date: Wed, 18 Apr 2001 15:47:15 +0100
You are asking for validation of an empty element rather than a null
element. Null - or nil, to be more precise - is flagged by
xsi:nil="true" (see http://www.w3.org/TR/xmlschema-1/#xsi_nil).
But what you want to do can be done - see the XML Schema FAQ which is in
principle at www.schemavalid.com but gets re-mapped at the moment -
http://www.chronocell.com/faq/xml-schema.html#c2 is the answer to your
question.
Francis.
"Saxena, Saurabh" wrote:
>
> Hi
> I am new to this group and XML.Actually i am facing one problem in XML
> I am validating a XML file using the XML Schema.There is one TAG in the XML
> file as
> <NAME>saurabh</NAME>
> When i am validating this file it is doing the validation proprely.The max
> length that is allowed in the NAME TAG is 8(as mentioned in the schema).
> If i am trying to validate the XML file with the TAG value as null like
> <NAME></NAME>
> It is not validation it and giving the error as "..<Line 8, Column 44>:
> XSD-2021: (Error) Element not completed: 'NAME'...." What i want is that it
> should also validate this file even if there is null value for the NAME TAG.
>
> How can we do it?Can we add something in the schema file so that it allows
> null value for a particular TAG
> regards
> Saurabh
>
- References:
- XML Help
- From: "Saxena, Saurabh" <saurabh.saxena@intel.com>