Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSD question: Allowing one required element and many optional elements.

From: chaitanyag@-------.--- (------)
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?
> >


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent