The rule is implemented in Schematron as defined by the Schematron standard [ISOSCHEMA]. In
addition, the @see
attribute is used for linking the Schematron rule
back to the documented constraint.
<sch:rule context="cabin-bag/weight"> <sch:let name="bag-weight" value="xs:float(.)"/> <sch:let name="passenger-name" value="../../name"/> <sch:assert test="$bag-weight le 8" see="http://www.cabin-bag.info/c1" diagnostics="diag-weight-8"> The weight of cabin luggage is 8kg or less. </sch:assert> </sch:rule>
More context information is given by using Schematron’s diagnostic element.
<sch:diagnostic id="diag-weight-8"> The cabin luggage of <sch:value-of select="$passenger-name"/> exceeded the maximum weight allowance by <sch:value-of select="$bag-weight -8"/>kg. Pack lighter! </sch:diagnostic>