As of XML Schema 1.1, there is an <xs:assert> where you can write XPath expressions to increase validation of elements/values.
There are a number of places this would be useful in HPXML. One example is HeatingSystem/AnnualHeatingEfficiency/Value where the only check currently is that the value is >= 0 because it handles different units (e.g., AFUE or HSPF). But for some units (e.g., AFUE), we know the value should also be <= 1, which could be handled by an xs:assert.
Another example is WaterHeatingSystem/EnergyFactor where you could allow different values for, say, electric storage water heaters vs fossil fuel storage water heaters vs heat pump water heaters.
As of XML Schema 1.1, there is an
<xs:assert>
where you can write XPath expressions to increase validation of elements/values.There are a number of places this would be useful in HPXML. One example is HeatingSystem/AnnualHeatingEfficiency/Value where the only check currently is that the value is >= 0 because it handles different units (e.g., AFUE or HSPF). But for some units (e.g., AFUE), we know the value should also be <= 1, which could be handled by an xs:assert.