Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Schema for simple XML-based scripting language

From: jhendrich@----------.------
To: 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.




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