Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - [XML Schema] Value of a field depending to other fields? >Thread Next - Re: Value of a field depending to other fields? Re: [XML Schema] Value of a field depending to other fields?To: NULL Date: 5/1/2006 2:21:00 PM xan2@o... wrote: > So, we need (in pseudocode) that: > > 1) salarypermonth = hoursofwork * salaryperhour > 2) percentofwork = hoursofwork/(TOTAL WORK), where TOTAL WORK = Sum of > all hoursofwork of all intances of xml file > > Is it possible to do it with XML Schemas. You can't express such constraints with a W3C XML schema. Schematron might be able to express the constraints. On the other hand it looks a bit as you are trying to store data in XML which should not be stored at all but rather computed when it is needed. -- Martin Honnen http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
