A list of assertions tested within the context specified by the required context attribute. NOTE:<br/>It is not an error if a rule never fires in a document. In order to test that a document always has some context, a new pattern should be created from the context of the document, with an assertion requiring the element or attribute.<br/>When the rule element has the attribute abstract with a value true, then the rule is an abstract rule. An abstract rule shall not have a context attribute. An abstract rule is a list of assertions that will be invoked by other rules belonging to the same pattern using the extends element. Abstract rules provide a mechanism for reducing schema size. |
QName | Type | Fixed | Default | Use | Inheritable | Annotation | |
---|---|---|---|---|---|---|---|
abstract | restriction of xs:token | false | optional |
|
|||
context | sch:pathValue | optional |
|
||||
flag | sch:flagValue | optional |
|
||||
fpi | sch:fpiValue | optional |
|
||||
icon | sch:uriValue | optional |
|
||||
id | xs:ID | optional |
|
||||
role | sch:roleValue | optional |
|
||||
see | sch:uriValue | optional |
|
||||
subject | sch:pathValue | optional |
|
||||
xml:lang | union of(xs:language, restriction of xs:string) | optional |
|
||||
xml:space | restriction of xs:NCName | optional | |||||
Wildcard: ANY attribute from ANY namespace OTHER than 'http://purl.oclc.org/dsdl/schematron' |
Element | sch:pattern |
<xs:element name="rule"> <xs:annotation> <xs:documentation>A list of assertions tested within the context specified by the required context attribute. NOTE: <br/>It is not an error if a rule never fires in a document. In order to test that a document always has some context, a new pattern should be created from the context of the document, with an assertion requiring the element or attribute. <br/>When the rule element has the attribute abstract with a value true, then the rule is an abstract rule. An abstract rule shall not have a context attribute. An abstract rule is a list of assertions that will be invoked by other rules belonging to the same pattern using the extends element. Abstract rules provide a mechanism for reducing schema size.</xs:documentation> </xs:annotation> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="sch:foreign"/> <xs:element ref="sch:include"/> <xs:element ref="sch:let"/> <xs:element ref="sch:assert"/> <xs:element ref="sch:report"/> <xs:element name="extends"> <xs:annotation> <xs:documentation>Abstract rules are named lists of assertions without a context expression. The current rule uses all the assertions from the abstract rule it extends.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="rule" use="required" type="xs:IDREF"> <xs:annotation> <xs:documentation>The required rule attribute references an abstract rule.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attributeGroup ref="sch:foreign-empty"/> </xs:complexType> </xs:element> </xs:choice> <xs:attribute name="flag" type="sch:flagValue"> <xs:annotation> <xs:documentation>The flag attribute allows more detailed outcomes.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attributeGroup ref="sch:rich"/> <xs:attributeGroup ref="sch:linkable"/> <xs:attributeGroup ref="sch:foreign"/> <xs:attribute name="abstract" default="false"> <xs:annotation> <xs:documentation>When the rule element has the attribute abstract with a value true, then the rule is an abstract rule.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="true"> <xs:annotation> <xs:documentation>Declares an abstract rule.</xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="false"> <xs:annotation> <xs:documentation>Explicitely specify that the rule is not abstract.</xs:documentation> </xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="id"< |