Can I check whether a particular element has some pattern only if it is not null
prathibha, ar
Greenhorn
Joined: Jun 22, 2001
Posts: 13
posted
0
Hi, I have an xml file and i am validating this xml file by means of xsd. I have an attribute called date which can be null also. but if suppose it is not null then i want to check for the pattern for it. Is it is possible. Thanks and regards prathibha
Aamir Memon
Greenhorn
Joined: Jul 05, 2001
Posts: 7
posted
0
You can do that as follows <xsd:element name="Date" nullable="true" type="xsd:date"> Aamir
prathibha, ar
Greenhorn
Joined: Jun 22, 2001
Posts: 13
posted
0
Thankyou for the reply. I tried the think which u had told . but it is giving the error as Attribute 'nullable' cannot appear in 'element'. What may be the reason for this. prathibha
Ambrose Tati
Ranch Hand
Joined: Oct 03, 2000
Posts: 55
posted
0
Hi there, I think you need something like: <xsd:element name="Date" type="xsd:date" nillable = "true" /> Hope it works. Ambrose Tati
subject: Can I check whether a particular element has some pattern only if it is not null