In this documentation the following expressions will be used. The table bellow shows the definitions of these expressions:
QuickFix |
A possible fix for a Schematron report or assert. An implementation should provide it to the user (per default) for each reported assert or report. The QuickFix will be executed if the user chooses it. |
---|---|
Global QuickFix |
A QuickFix which is defined in the top-level <sqf:fixes> element. A global QuickFix is available in each Schematron rule. |
Local QuickFix |
A QuickFix which is defined for a Schematron rule. It is only available in this Schematron rule. |
Execute a QuickFix |
All activity elements which the QuickFix contains will be performed. |
Activity element |
implements a change command. |
Change command |
defined by an activity element for a change of the XML instance. A change command can have the activity kinds "add", "delete", "replace" and "stringReplace". |
Add change command |
creates one or more nodes and adds them relatively to an anchor node to the XML instance. |
Delete change command |
deletes one or more nodes. |
Replace change command |
creates one or more nodes and replaces nodes of the XML instance with them. |
String replace change command |
creates one or more nodes and replaces substrings of a text node of the XML instance with them. |
Anchor node |
context node of an activity element. The node is the subject of the change command of the activity element. |
This activity element adds a node to one or more nodes of the XML instance.
The attributes match and position define the position where the nodes will be added. The position is determined by the anchor node(s) (@match) and the insertion direction (@position).
The attributes node-type, select and target and the content of the element define the nodes to be added.
Description |
The position attribute defines the position of the nodes to be added relatively to the anchor node (see @match). |
---|---|
Use |
optional |
Default |
If the value of the node-type attribute is attribute, the position attribute should not be set, because the node to be added will always be inserted as attribute. Otherwise the default value is first-child. |
Value |
|
This element calls another QuickFix within a QuickFix. The called QuickFix must be defined globally or for the same Schematron rule as the calling QuickFix. A calling QuickFix should not have other activity elements.
The calling QuickFix adopts the activity elements of the called QuickFix. With the help of parameters, these can be specified (see <sqf:with-param>).
The description and other characteristics (e.g. @use-when) of the called QuickFix will not be adopted.
Description |
This attribute refers to a QuickFix by using the ID. The referred QuickFix must be defined globally or for the same Schematron rule as the referring QuickFix. |
---|---|
Use |
required |
Value |
xs:string |
This element is available within activity elements. The function is to copy nodes selected by the select attribute. The element with its attribute is treated as <xsl:copy-of> with select attribute as it is defined in the XSLT requirement.
Description |
The attribute selects nodes to be copied. |
---|---|
Use |
optional |
Default |
node() |
Value |
xs:string XPath expression. |
This activity element deletes one or more nodes of the XML instance.
The match attribute defines the nodes to be deleted.
Adds a human readable description to the parent element.
Defines a Schematron QuickFix with its content. All commands will be processed if the QuickFix is activated by the user.
Description |
The ID to reference the QuickFix. |
---|---|
Use |
required |
Value |
xs:NCName |
Description |
With this attribute the role of the QuickFix can be set manually. The role of a QuickFix describes the type of change which it makes. If the role is not set manually, the role is the type of the used activity element ("add", "delete", "replace" or "stringReplace"). If two different activity elements are used in a QuickFix, the role is automatically "mix". |
---|---|
Use |
optional |
Value |
|
Description |
QuickFixes with use-for-each attribute are generic. Each return value of the evaluated XPath expression should create an own QuickFix. To access to the current return value, the XPath variable $sqf:current should be provided. |
---|---|
Use |
optional |
Default |
. |
Value |
xs:string |
Description |
The condition to provide the QuickFix. |
---|---|
Use |
optional |
Default |
true() |
Value |
xs:string |
Contains globally useable Schematron QuickFixes and QuickFix groups.
Defines a Schematron QuickFix group. If the group is linked by an assert or report, all QuickFixes of this group will be associated with the assert/report.
Description |
The ID to reference the QuickFix group. |
---|---|
Use |
required |
Value |
xs:string |
Description |
The condition to provide the QuickFixes of the QuickFix group. |
---|---|
Use |
optional |
Default |
true() |
Value |
xs:string |
Paragraph within a description.
This element defines a parameter for a QuickFix. The parameter can be used like a variable within the QuickFix. The value can be set by the <sqf:with-param> element.
The content defines a default value for the parameter.
Abstract parameters (see attribute abstract) cannot be used as normal XPath variables. An abstract parameter declares, that the current QuickFix uses a parameter of an abstract pattern. A QuickFix with one or more abstract parameters can be used just by abstract patterns. The value of the parameter will be set by the instantiation of the abstract pattern according to the Schematron specification. The instantiation of the abstract pattern must specify a value for every abstract parameter of the QuickFix.
Description |
This attribute sets for the parameter whether it is abstract or not. The current quick fix can be instantiate only from an abstract pattern that defines this abstract parameter. Inside of a global QuickFix every used parameter of an abstract pattern must be declared by an abstract parameter. If a parameter is defined as abstract, it can not have a type, required or default attribute. Its value will be only form the abstract pattern instantiation. |
---|---|
Use |
optional |
Default |
false |
Value |
xs:boolean The value true is used for abstract parameter, false for regular parameter. |
Description |
This attribute sets for the parameter whether it is optional or required. If the parameter is required, it cannot have a default attribute or any content. |
---|---|
Use |
optional |
Default |
no |
Value |
The value yes is used for required, no for optional. |