Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[XML Schema] Value of a field depending to other fields?

From: xan2@---.---
To: NULL
Date: 5/1/2006 5:06:00 AM

Hi,

I just want to know if it's possible to declare a value of a field in
XML Schema depending to other fields.

For example, suppose we have (in pseudo-xml not in xsd) a person who
have this fields:

<person>
   <name> .... </name>
   <hoursofwork> </hoursofwork>
   <salaryperhour> </salaryperhour>
   <salarypermonth> <salarypermonth>
   <percentofwork> </percentofwork>
</person>

- name is string
- hoursofwork is number of hours person work in a month. So we have
that 0<= hoursofwork <= 744
- salaryperhour is what he/she receives per hour (it could be unsigned
int)
- salarypermonth is only salaryperhour plus hoursofwork
- percent of work is the percent of work a person do respecting to the
total of amount of hours of work of all person of the enterprise

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. I suspect that no, and that
we need some more stronger tool combined with schema (like OWL). Can
you answer me?

Thank you very much,
Xan.



transparent
Print
Mail
Like It
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