📄 order.sct
字号:
<?xml version="1.0"?><schema xmlns="http://www.ascc.net/xml/schematron"> <title>A Schematron Schema for Orders</title> <pattern> <rule context="Order"> <!-- Due to round-off error, floating point numbers should rarely be compared for direct equality. For this purpose, it's enough if they're accurate within one penny. --> <assert test="(Shipping+Subtotal+Tax - Total)<0.01 and (Shipping+Subtotal+Tax - Total)>-0.01"> The subtotal, tax, and shipping must add up to the total. </assert> <assert test= "(Subtotal+Shipping)*((Tax/@rate) div 100.0) - Tax < 0.01 and (Subtotal+Shipping)*((Tax/@rate) div 100.0)-Tax > -0.01 "> The tax was incorrectly calculated. </assert> </rule> </pattern></schema>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -