![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XSD question: Allowing one required element and many optional elements. [Thread Next] Re: XSD question: Allowing one required element and many optional elements.To: NULL Date: 4/3/2005 9:16:00 PM I tried doing a choice between all the possible combinations. Doesn't work. Because at some stage I have to make a choice between the element node(or dialog) with one data type and the element node (or dialog) with another data type and XSD doesn't allow that. Basically somewhere I would have to go <choice> <element name="dialog" type="optional_transition"/> <element name="dialog" type="compulsory_transition"/> </choice> This doesn't work because the element name is the same. It can only choose different elements, not different element types. Same goes for <all> and all the other tags. There seems to be a choice for elements themselves but not the element types. Hmmmm....Bit of a non trivial restriction isn't it. Anyway, at least now I know its not something i am overlooking. Thanks again Stan. "Stan Kitsis [MSFT]" <skits@m...> wrote in message news:<424da294$1@n...>... > You can't do conditions like this in XML Schema. You can try using a big > choice with all possible states > > -- > Stan Kitsis > Program Manager, XML Technologies > Microsoft Corporation > > This posting is provided "AS IS" with no warranties, and confers no rights. > > > <chaitanyag@h...> wrote in message > news:1111469996.196709.56910@z...... > >A more challenging aspect of the problem: > > > > Lets modify the xml slightly > > > > <root> > > <dialog> > > <node> > > <description/> > > <config/> > > <log/> > > <transition/> > > <node> > > <transition/> > > <dialog> > > <transition/> > > <\root> > > > > I need a rule that says that its ok if a node doesn't have a transition > > as long as the dialog or root has a transition (it is possible for all > > 3 to have a transition, which is ok). Note that a root can contain many > > dialogs and a dialog can contain many nodes. > > > > What i need is some sort of fall through/ sibling navigation, parent > > navigation sort of command. How do I go about doing this in XSD? > > | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
