我全部,给定下面的xml,如果MortgageProductInterestRateCollarLimitPct大于MortgageProductInterestRateCappedLimitPct,xsd会是什么样才能确保chema验证失败?
<MortgageInterestRate>
<MortgageInterestRatePercentage>1.99</MortgageInterestRatePercentage>
<MortgageInterestRatePeriodInMonths>0</MortgageInterestRatePeriodInMonths>
<MortgageInterestRateTypeCode>V</MortgageInterestRateTypeCode>
<MortgageInterestRateTierName>Standard Mortgage Rate</MortgageInterestRateTierName>
<MortgageProductInterestRateLoadingPct>0.00</MortgageProductInterestRateLoadingPct>
<MortgageProductInterestRateBaseRateTypeCode>4</MortgageProductInterestRateBaseRateTypeCode>
<MortgageProductInterestRateCappedLimitPct>234534<MortgageProductInterestRateCappedLimitPct />
<MortgageProductInterestRateCollarLimitPct>654<MortgageProductInterestRateCollarLimitPct />
</MortgageInterestRate>
由于
答案 0 :(得分:2)
这是XML Schema无法处理的一种验证。您可以定义结构限制,以及对单个节点及其值的限制 - 但是您无法获得依赖于其他节点及其值的检查。
为此,您必须查看其他XML验证机制,例如Schematron或其他。
马克