Re: Looking for the flexibility of having conditional section in Xml Schema

 Kunnummal.Naheed writes (I hope I have gotten your name in the 
appropriate order, if not my sincere apologies!):

>> I have got a requirement in which I need to have a specific 
>> structure for particular value on an element. 

It would be helpful if you could clarify what you mean by "structure for 
value on an element".  There are at least two sorts of values for which 
schema can constrain the form.  If your element is of simple type, then 
you can use the Pattern facet [1,2,3], which allows you to use regular 
expressions to constrain the characters in the value.  For example 
(warning, I'm not a regex expert), I believe the following pattern:

        0(\d)+

would give you integer forms with no leading sign, and at least one 
redundant zero at the beginning. 

Of course, you can also constrain the element structure of a parent 
element using sequence, choice, and the like.  I hope this is helpful.

Noah

[1] http://www.w3.org/TR/xmlschema-0/#ref9
[2] http://www.w3.org/TR/xmlschema-0/#regexAppendix
[3] http://www.w3.org/TR/xmlschema-2/#dt-pattern
------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------

Received on Monday, 13 October 2003 12:15:30 UTC