Table of Contents
Clauses 5.4.11 (
param
element)The
param
element specifies a name-value pair providing parameters for an abstract pattern or a schema. [...] Thevalue
attribute is a fragment of a query. Thevalue
attribute is required for parameters specified for schemas. The value of a parameter for a schema may be overridden at user option. This mechanism is implementation-defined.Parameter names shall be distinct within the scope of a pattern or schema.
element schema {
attribute id { xsd:ID }?,
rich,
attribute schemaVersion { non-empty-string }?,
attribute schematronEdition { non-empty-string }?,
attribute defaultPhase { xsd:IDREF }?,
attribute queryBinding { non-empty-string }?,
(foreign
& (inclusion | extends)*
& (title?, ns*, p*, param*, let*, phase*, abstract-rules*, (rule-set|pattern)+, p*, diagnostics?, properties?))
}
Example 16. Schema-level parameters
Validating a document against this schema:
<sch:schema> <sch:param name='myParam' value='"bar"'/> <sch:pattern id='foo'> <sch:rule context='*'> <sch:assert test='false()'><sch:value-of select='$myParam'/></sch:assert> </sch:rule> </sch:pattern> </sch:schema>
would result in SVRL containing:
<svrl:failed-assert test='false()'>bar</svrl:failed-assert>