![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Schema for simple XML-based scripting language [Thread Next] Re: Schema for simple XML-based scripting languageTo: NULL Date: 6/2/2006 11:53:00 AM > One last problem. The <cmd> element has a location property that can > be either 'server' or 'client'. If it is client, the contents of the > command attribute are run directly on the command line. If it is > server, I process the <file> and <folder> elements that are children of > the <cmd> element, execute the contents of the command attribute from > the application's temp directory, and then delete all of the files > created by the <file> and <folder> elements that are children of the > <cmd> node. > > Is it possible to define an element that must have (greater than 1) > children of certain types if it has an attribute with one value, but > have zero children if it has an attribute with another value? If so, > how? > > Chris > Chris, to do that you need to define cmd in two different ways in the same scope. That isn't valid XML Schema to my knowledge. But you could always branch your logic at the level of creating, for example, cmdClient OR a cmdServer element when you write the manifest file, and define each accordingly, and your processor downstream has to look for both cmdClient AND cmdServer as opposed to just cmd. | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
