You cannot validate the order of job IDs using only XML Schema, because it doesn't provide any arithmetic operations or less-than comparisons with things other than constants, and the restricted XPath subset doesn't include such operations either.
Instead, consider using XSLT or Schematron. They support enough XPath to do this easily.
Or use your favourite programming language with an XML reader library. It won't even be necessary to keep the whole document in memory.
Edited byrantaTuesday, November 19, 2013 5:03 PMdisambiguate
Marked as answer bySreenath GVWednesday, November 20, 2013 6:12 AM