Rajan,
There's a type specifically for that - xsd:boolean
See http://www.w3.org/TR/xmlschema-0/#CreatDt
In general, enumerations are done like this:
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="first allowed value"/>
<xsd:enumeration value="second allowed value"/>
... etc ...
</xsd:restriction>
</xsd:simpleType>
Regards,
Wayne M. Bradney
Wall Street Systems, Inc.
30 Broad Street, 24th Floor
New York, NY 10004
Phone: +1 (212) 401 8239
E-Mail: [EMAIL PROTECTED]
-----Original Message-----
From: Rajan Gupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 28, 2001 3:33 PM
To: [EMAIL PROTECTED]
Subject: XMLSchema:Can we specify a restriction on the content for an
element
Hi! All,
Is it possible to specify the content of an element e.g.
<MyTest>
<secured> true </secured>
</MyTest>
I want to make sure that only true or false can appear as the content of
the element secured. Is it possible to do that using schemas.
Thanks in advance,
Rajan
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]