Schema documentation for file svrlDP.rng.

Top

Date Generated: 2007-02-07Z

Revision History

Rev. date Desc Author
1.0 2007-01-24T10:56:47.0Z Initial release. This file is modification of the version in Annex D of the standard Dave P
1.1 2007-01-28T09:31:16Z Amended in light of usage. View the .rng file to see actual changes. Dave P
1.2 2007-01-31T11:08:35.0Z Amended in light of usage. Added span and emph elements to text Dave P
1.3 2007-02-01T18:35:44.0Z Updated to include decorative elements. Dave P

Element definitions in this Schema.

Attributes. Definitions in this Schema.

Data types. Definitions in this Schema.


ISO /IEC 19757-3:2006

Revision 1.0

(c) International Organization for Standardization 2005. Permission to copy in any form is granted for use with conforming SGML systems and applications as defined in ISO 8879, provided this notice is included in all copies.

identifier : http://www.dpawson.co.uk/schematron/isoSchematron.rng
creator : Dave Pawson
dateCreated : 2007-01-26T10:51:30.0Z
isPartOf : ISO/IEC 19757-3:2006
publisher : http://www.dpawson.co.uk
rights : © Dave Pawson, 2007
creator : Dave Pawson

Document element


Element schematron-output

The root element of the svrl format

The optional title attribute is derived from iso:schema/iso:title element.

The optional phase attribute is apparently unused? @FIXME

The schemaVersion attribute is derived from the iso:schema/@schemaVersion attribute

{ schematron-output

{optional}

{optional}
Typed Data (NMTOKEN)

{optional}
{zero Or More
Human-text  
} {zero Or More
Ns-prefix-in-attribute-values  
} {one Or More}
Active-pattern   {one Or More}
Fired-rule   {zero Or More
{choice}
Failed-assert  Successful-report  
}
}


Element ns-prefix-in-attribute-values

Provides the output file with ready access to foreign namespaces defined in the Schematron schema. Derived from the iso:ns element in Schematron. The attribute prefix provides the ns prefix, the uri provides the namespace.

{ ns-prefix-in-attribute-values
Typed Data (NCName)
Typed Data (anyURI)
{Empty element}
}


Element active-pattern

Reports on which patterns are active in this phase. Derived from the iso:active/@pattern attribute in the Schematron schema. Both the name and id values appear to be derived from the pattern attribute. It would appear that the role attribute is unused @FIXME

2007-01-27T10:54:45Z. Added foreign-nodes reference.

{ active-pattern

{optional}
Typed Data (ID)

{optional}

{optional}
Typed Data (NMTOKEN)
Rich  
{optional}
{ title
{mixed}
{zero Or More
Dir  
}
} {zero Or More
Text  
}
}


Element fired-rule

Each time a rule is fired it is reported by a line in the output file, reporting the context in which the rule fired. the context attribute is derived from iso:rule/@context. the id, role and flag attributes require generation by the schema author, by means of template overrides. @FIXME

{ fired-rule

{optional}
Typed Data (ID)

{optional}
Typed Data (NMTOKEN)

{optional}
Typed Data (NMTOKEN)
{Empty element}
}


Element diagnostic-reference

Reports the dignostic used, by means of the diagnostic attribute of this element. The value is derived from the diagnostics attribute on iso:assert and iso:report.

{ diagnostic-reference
Typed Data (NMTOKEN)
Human-text  
}


Element failed-assert

Reports on an assertion that has failed. The test attribute reports the test undertaken. If set to operate, the location attribute reports the source document location and the contained text reports the assertion message. Diagnostics may be included if referenced from the iso:assert element by the diagnostics attribute.

{ failed-assert
Attlist.assert-and-report   {zero Or More
Diagnostic-reference  
} {zero Or More
Human-text  
}
}


Element successful-report

Reports on an assertion that has passed. The test attribute reports the test undertaken. If set to operate, the location attribute reports the source document location and the contained text reports the assertion message. Diagnostics may be included if referenced from the iso:assert element by the diagnostics attribute.

{ successful-report
Attlist.assert-and-report   {zero Or More
Diagnostic-reference  
} Human-text  
}


Element text

Basic paragraph. to help with documentation. Styling can be aided with the class attribute and the icon attribute. It may contain foreign elements.

{ text

{optional}
Typed Data (ID)

{optional}
{text content.}
{optional}
Typed Data (anyURI)
{interleave - in any order
Foreign-nodes   {zero Or More
{choice}
{text content.} Dir  Emph  Span  
}
}
}


Element text

Valid within schematron-output, diagnostic-reference, failed-assert and successful-report.

The text element is used as the general purpose text container for report contents.

{ text
{mixed}
{choice}
Foreign-nodes   {zero Or More
{choice}
Emph  Span  Dir  Name  
}
}


Element dir

{ dir
{choice}
ltr rtl  {interleave - in any order
Foreign-nodes   {text content.}
}
}


Element name

Provides access to nodes in the input document. If the optional path attribute is used, then the name of this node is retrieved. Without the path attribute, the name of the current context node is retrieved.

{ name

{optional}
PathValue  Foreign-empty   {text content.}
}


Element emph

A general purpose emphasis element

{ emph
{text content.}
}


Element span

A general purpose inline element, as per html, usage clarified by the class attribute

{ span
{text content.} {mixed}
{zero Or More
Emph  
}
}


Element attlist.assert-and-report

This group of optional attributes provide additional information about a report entry.

The id attribute may be generated for linking purposes and is generally copied over from the associate Schematron assertion.

The location attribute identifies the xpath to the input document at which the report was fired.

the test attribute reports the assertion test attribute contents.

The role attribute is generated by an author, in addition to generic report content. It can help in styling output.

The flag attribute is added to the reported assertion, being copied over from the iso:assert or iso:report. Although valid on iso:rule, this appears not to be used. @FIXME


{optional}
Typed Data (ID)

{optional}
Typed Data (NMTOKEN)
Rich  Linkable  


Element 'foreign-nodes'

An element with attributes not in the Schematron namespace and not in the null namespace

{zero Or More
{choice}
Foreign-attributes  Foreign-elements  
}


Element 'foreign'

An element not in the Schematron namespace

{zero Or More
{
anyName
Except {
Elements in namespace {}
Elements in namespace {http://purl.oclc.org/dsdl/svrl}
} {text content.}
}
}


Element anything

Any element in any namespace (including svrl ns or null namespace)

{zero Or More
{choice}
{
anyName
Anything  
} anyName
{text content.}
}


An empty element with foreign attributes

An element not in the Schematron namespace which is empty and may contain attributes

Foreign-attributes  


Foreign attributes

attributes of elements in a namespace other than the Schematron namespace.

{zero Or More
anyName
Except {
Elements in namespace {}
Elements in namespace {http://www.w3.org/XML/1998/namespace}
}
}


Rich.

A set of optional attributes which may be used to decorate some elements


{optional}
UriValue  
{optional}
UriValue  
{optional}
FpiValue  
{optional}
LangValue  
{optional}
{choice}
preserve default 


linkable attribute

Optional attributes (role and subject). If the subject is present, the role attribute labels the arc between the context node and any nodes which match the subject value (an xpath expression).


{optional}
RoleValue  
{optional}
PathValue  


Datatype roleValue

The role attribute allows you to label the subject and subject nodes of assertions with simple labels. You could also see it as labelling the arcs between context subject and the arc subjects. For example, if generating RDF: see xml-dev archive

For example, imagine you had a document containing gene sequences. You could use the role attribute to label the junk DNA parts.

So the role could be what role the subject plays in the document, but is could be what role the subject plays in the pattern, or what role the rule plays in the pattern.

The role attribute is used, therefore, like a kind of type binding, but instead of binding the node to a type name, it is bound to (one or more) arbitrary names.

Typed Data (string)


Datatype uriValue

A URI, used as the value of an attribute to specify, for example, an inclusion, an icon file, or simply a namespace URI

Typed Data (anyURI)


Datatype pathValue

An xpath expression returning a node value or name (dependent on context)

Typed Data (string)


Datatype fpiValue

A formal public identifier for containing element (schema, assert, report etc)

Typed Data (string)


Datatype exprValue

An xpath expression returning a boolean value. See assert and report which both use the test attribute.

Typed Data (string)


Datatype langValue

The value assigned to an xml:lang attribute. Normally used to identify the language used in the containing element and its children.

Typed Data (language)