home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 160 - Disc 2 / MF_UK_160_2.iso / pc / DiscContent / Trials / oxygen / lib / oxygen.jar / builtin / schematron1-5.xsd < prev    next >
Encoding:
Extensible Markup Language  |  2005-07-21  |  37.8 KB  |  702 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- schemaVersion of 2001/02/15 -->
  3. <!-- documentation : http://www.schematron.com/iso/Schematron.html -->
  4. <xs:schema targetNamespace="http://www.ascc.net/xml/schematron" xmlns:sch="http://www.ascc.net/xml/schematron"
  5.     xmlns="http://www.ascc.net/xml/schematron" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  6.     version="+//IDN sinica.edu.tw//SGML W3C XML Schema for Schematron 1.5//EN">
  7.     <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
  8.         <xs:annotation>
  9.             <xs:documentation> Get access to the xml: attribute groups for xml:lang </xs:documentation>
  10.         </xs:annotation>
  11.     </xs:import>
  12.     <xs:annotation>
  13.         <xs:documentation source="http://www.ascc.net/xml/resource/schematron/schematron.html" xml:lang="en"/>
  14.     </xs:annotation>
  15.     <xs:element name="active">
  16.         <xs:annotation>
  17.             <xs:documentation>Defines the pattern that is active in the current phase.</xs:documentation>
  18.         </xs:annotation>
  19.         <xs:complexType mixed="true">
  20.             <xs:choice minOccurs="0" maxOccurs="unbounded">
  21.                 <xs:element ref="sch:dir"/>
  22.                 <xs:element ref="sch:emph"/>
  23.                 <xs:element ref="sch:span"/>
  24.             </xs:choice>
  25.             <xs:attribute name="pattern" type="xs:IDREF" use="required">
  26.                 <xs:annotation>
  27.                     <xs:documentation>The required pattern attribute is a reference to a pattern that is active in the
  28.                         current phase.</xs:documentation>
  29.                 </xs:annotation>
  30.             </xs:attribute>
  31.         </xs:complexType>
  32.     </xs:element>
  33.     <xs:element name="assert">
  34.         <xs:annotation>
  35.             <xs:documentation>An assertion made about the context nodes. 
  36.                 The data content is a natural-language assertion.
  37.                 The natural-language assertion shall be a positive statement of a constraint.<br/>
  38.                 NOTE:<br/>
  39.                 The natural-language assertion may contain information about actual values 
  40.                 in addition to expected values and may contain diagnostic information. 
  41.                 Users should note, however, that the diagnostic element is provided for 
  42.                 such information to encourage clear statement of the natural-language assertion.            
  43.             </xs:documentation>
  44.         </xs:annotation>
  45.         <xs:complexType mixed="true">
  46.             <xs:choice minOccurs="0" maxOccurs="unbounded">
  47.                 <xs:element ref="sch:name"/>
  48.                 <xs:element ref="sch:emph"/>
  49.                 <xs:element ref="sch:dir"/>
  50.                 <xs:element ref="sch:span"/>
  51.                 <xs:any namespace="##other" processContents="lax"/>
  52.             </xs:choice>
  53.             <xs:attribute name="test" type="xs:string" use="required">
  54.                 <xs:annotation>
  55.                     <xs:documentation>The required test attribute is an assertion test evaluated in the current context. 
  56.                     If the test evaluates positive, the report succeeds.</xs:documentation>
  57.                 </xs:annotation>
  58.             </xs:attribute>
  59.             <xs:attribute name="role" type="xs:NMTOKEN">
  60.                 <xs:annotation>
  61.                     <xs:documentation>A name describing the function of the assertion or context node in the pattern. If the assertion has a subject attribute, then the role labels the arc between the context node and any nodes which match the path expression given by the subject attribute.
  62.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  63.                 </xs:annotation>
  64.             </xs:attribute>
  65.             <xs:attribute name="id" type="xs:string">
  66.                 <xs:annotation>
  67.                     <xs:documentation>
  68.                         The unique identifier with the schema for the assert element.
  69.                     </xs:documentation>
  70.                 </xs:annotation>
  71.             </xs:attribute>
  72.             <xs:attribute name="diagnostics" type="xs:IDREFS">
  73.                 <xs:annotation>
  74.                     <xs:documentation>The optional diagnostics attribute is a reference to further diagnostic information.</xs:documentation>
  75.                 </xs:annotation>
  76.             </xs:attribute>
  77.             <xs:attribute name="icon" type="xs:anyURI">
  78.                 <xs:annotation>
  79.                     <xs:documentation>The location of a graphics file containing some visible representation of the severity, significance or other grouping of the associated element.
  80.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  81.                 </xs:annotation>
  82.             </xs:attribute>
  83.             <xs:attribute name="subject" type="xs:string" default=".">
  84.                 <xs:annotation>
  85.                     <xs:documentation>A path allowing more precise specification of nodes. 
  86.                         The path expression is evaluated in the context of the context node of the current rule. 
  87.                         If no subject attribute is specified, the current subject node may be used.
  88.                         NOTE:<br/>                        
  89.                         The subject attribute is required because the rule context may have been selected for reasons of convenience or performance,
  90.                         in association with the particular assertion tests. In such cases, the rule context may not be useful to identify users,
  91.                         and the nodes located by the subject attribute may be more useful. Similarly, it may not be possible to determine from an 
  92.                         assertion test which nodes the assertion test has tested. In such a case, the nodes located by the 
  93.                         subject attribute may be more useful.
  94.                     </xs:documentation>
  95.                 </xs:annotation>
  96.             </xs:attribute>
  97.             <xs:attribute ref="xml:lang"/>
  98.             <xs:anyAttribute namespace="##other" processContents="lax"/>
  99.         </xs:complexType>
  100.     </xs:element>
  101.     <xs:element name="diagnostic">
  102.         <xs:annotation>
  103.             <xs:documentation>
  104.                 A natural-language message giving more specific details concerning a failed assertion, 
  105.                 such as found versus expected values and repair hints.
  106.                 NOTE:<br/>
  107.                 In multiple languages may be supported by using a different diagnostic element for each language,
  108.                 with the appropriate xml:lang language attribute, and referencing all the unique identifiers of the 
  109.                 diagnostic elements in the diagnostics attribute of the assertion.
  110.                 <br/>
  111.                 An implementation is not required to make use of this element.                
  112.             </xs:documentation>
  113.         </xs:annotation>
  114.         <xs:complexType mixed="true">
  115.             <xs:choice minOccurs="0" maxOccurs="unbounded">
  116.                 <xs:element ref="sch:value-of"/>
  117.                 <xs:element ref="sch:emph"/>
  118.                 <xs:element ref="sch:dir"/>
  119.                 <xs:element ref="sch:span"/>
  120.                 <xs:any namespace="##other" processContents="lax"/>
  121.             </xs:choice>
  122.             <xs:attribute name="id" type="xs:ID" use="required">
  123.                 <xs:annotation>
  124.                     <xs:documentation>
  125.                         The unique identifier with the schema for the diagnostic element.
  126.                     </xs:documentation>
  127.                 </xs:annotation>
  128.             </xs:attribute>
  129.             <xs:attribute name="icon" type="xs:anyURI">
  130.                 <xs:annotation>
  131.                     <xs:documentation>The location of a graphics file containing some visible representation of the severity, significance or other grouping of the associated element.
  132.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  133.                 </xs:annotation>
  134.             </xs:attribute>
  135.             <xs:attribute ref="xml:lang"/>
  136.             <xs:anyAttribute namespace="##other" processContents="lax"/>
  137.         </xs:complexType>
  138.     </xs:element>
  139.     <xs:element name="diagnostics">
  140.         <xs:annotation>
  141.             <xs:documentation>
  142.                 Section containing individual diagnostic elements.
  143.                 An implementation is not required to make use of this element.
  144.             </xs:documentation>
  145.         </xs:annotation>
  146.         <xs:complexType>
  147.             <xs:sequence>
  148.                 <xs:element ref="diagnostic" minOccurs="0" maxOccurs="unbounded"/>
  149.             </xs:sequence>
  150.         </xs:complexType>
  151.     </xs:element>
  152.     <xs:element name="dir">
  153.         <xs:annotation>
  154.             <xs:documentation>
  155.                 A section of natural-language text with a direction specified by the value attribute. 
  156.                 <br/>
  157.                 An implementation is not required to make use of this element.                
  158.             </xs:documentation>
  159.         </xs:annotation>
  160.         <xs:complexType>
  161.             <xs:simpleContent>
  162.                 <xs:extension base="xs:string">
  163.                     <xs:attribute name="value">
  164.                         <xs:annotation>
  165.                             <xs:documentation>
  166.                                 Specify the direction of the text.
  167.                                 The value ltr indicates left-to-right text; the value rtl indicates right-to-left text.
  168.                             </xs:documentation>
  169.                         </xs:annotation>
  170.                         <xs:simpleType>
  171.                             <xs:restriction base="xs:NMTOKEN">
  172.                                 <xs:enumeration value="ltr"/>
  173.                                 <xs:enumeration value="rtl"/>
  174.                             </xs:restriction>
  175.                         </xs:simpleType>
  176.                     </xs:attribute>
  177.                 </xs:extension>
  178.             </xs:simpleContent>
  179.         </xs:complexType>
  180.     </xs:element>
  181.     <xs:element name="emph" type="xs:string"/>
  182.     <xs:annotation>
  183.         <xs:documentation>
  184.             A portion of text that should be rendered with some emphasis.
  185.             An implementation is not required to make use of this element.
  186.         </xs:documentation>
  187.     </xs:annotation>
  188.     <xs:element name="extends">
  189.         <xs:annotation>
  190.             <xs:documentation>
  191.                 Abstract rules are named lists of assertions without a context expression.
  192.                 The current rule uses all the assertions from the abstract rule it extends.
  193.             </xs:documentation>
  194.         </xs:annotation>
  195.         <xs:complexType>
  196.             <xs:attribute name="rule" type="xs:string" use="required">
  197.             <xs:annotation>
  198.                 <xs:documentation>
  199.                     The required rule attribute references an abstract rule.
  200.                 </xs:documentation>
  201.             </xs:annotation>
  202.             </xs:attribute>
  203.         </xs:complexType>
  204.     </xs:element>
  205.     <xs:element name="key">
  206.         <xs:annotation>
  207.             <xs:documentation>
  208.                 A rule element can also contain key elements, which allows XSLT's key mechanism to be used.
  209.             </xs:documentation>
  210.         </xs:annotation>
  211.         <xs:complexType>
  212.             <xs:attribute name="name" type="xs:NMTOKEN" use="required">
  213.                 <xs:annotation>
  214.                     <xs:documentation>
  215.                         Name of the key.
  216.                     </xs:documentation>
  217.                 </xs:annotation>
  218.             </xs:attribute>
  219.             <xs:attribute name="path" type="xs:string" use="required">
  220.                 <xs:annotation>
  221.                     <xs:documentation>
  222.                         The required path attribute gives the path from the current context to the field to be used as a key.
  223.                     </xs:documentation>
  224.                 </xs:annotation>
  225.             </xs:attribute>
  226.             <xs:attribute name="icon" type="xs:anyURI">
  227.                 <xs:annotation>
  228.                     <xs:documentation>The location of a graphics file containing some visible representation of the severity, significance or other grouping of the associated element.
  229.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  230.                 </xs:annotation>
  231.             </xs:attribute>
  232.         </xs:complexType>
  233.     </xs:element>
  234.     <xs:element name="name">
  235.         <xs:annotation>
  236.             <xs:documentation>
  237.                 Provides the names of nodes from the instance document to allow clearer assertions and diagnostics.<br/>                
  238.                 An implementation which does not report natural-language assertions is not required to make use of this element.
  239.             </xs:documentation>
  240.         </xs:annotation>
  241.         <xs:complexType>
  242.             <xs:attribute name="path" type="xs:string" default=".">
  243.                 <xs:annotation>
  244.                     <xs:documentation>
  245.                         The optional path attribute is an expression evaluated in the current context that returns a string
  246.                         that is the name of a node. In the latter case, the name of the node is used.
  247.                     </xs:documentation>
  248.                 </xs:annotation>
  249.             </xs:attribute>
  250.         </xs:complexType>
  251.     </xs:element>
  252.     <xs:element name="ns">
  253.         <xs:annotation>
  254.             <xs:documentation>
  255.                 Specification of a namespace prefix and URI. 
  256.                 NOTE:<br/>
  257.                 Because the characters allowed as names may change in versions of XML subsequent to W3C XML 1.0,
  258.                 the RELAX NG Compact schema for Schematron does not constrain the prefix to particular characters.
  259.                 In an ISO Schematron schema, namespace prefixes in context expressions, assertion tests and other
  260.                 query expressions should use the namespace bindings provided by this element. Namespace prefixes 
  261.                 should not use the namespace bindings in scope for element and attribute names.
  262.             </xs:documentation>
  263.         </xs:annotation>
  264.         <xs:complexType>
  265.             <xs:attribute name="uri" type="xs:anyURI" use="required">
  266.                 <xs:annotation>
  267.                     <xs:documentation>
  268.                         The required uri attribute is a namespace URI.
  269.                     </xs:documentation>
  270.                 </xs:annotation>
  271.             </xs:attribute>
  272.             <xs:attribute name="prefix" type="xs:NCName">
  273.                 <xs:annotation>
  274.                     <xs:documentation>
  275.                         The required prefix attribute is an XML name with no colon character. 
  276.                     </xs:documentation>
  277.                 </xs:annotation>
  278.             </xs:attribute>
  279.         </xs:complexType>
  280.     </xs:element>
  281.     <xs:element name="p">
  282.         <xs:annotation>
  283.             <xs:documentation>
  284.                 A paragraph of natural language text containing maintainer and user information about the parent element.
  285.                 <br/>An implementation is not required to make use of this element.
  286.             </xs:documentation>
  287.         </xs:annotation>
  288.         <xs:complexType mixed="true">
  289.             <xs:choice minOccurs="0" maxOccurs="unbounded">
  290.                 <xs:element ref="sch:dir"/>
  291.                 <xs:element ref="sch:emph"/>
  292.                 <xs:element ref="sch:span"/>
  293.             </xs:choice>
  294.             <xs:attribute name="id" type="xs:string">
  295.                 <xs:annotation>
  296.                     <xs:documentation>
  297.                         The unique identifier with the schema for the p element.
  298.                     </xs:documentation>
  299.                 </xs:annotation>
  300.             </xs:attribute>
  301.             <xs:attribute name="class" type="xs:string">
  302.                 <xs:annotation>
  303.                     <xs:documentation>
  304.                         The schema can nominate paragraphs that should be rendered in a distinct way, keyed with the class attribute.
  305.                     </xs:documentation>
  306.                 </xs:annotation>
  307.             </xs:attribute>
  308.             <xs:attribute name="icon" type="xs:anyURI">
  309.             <xs:annotation>
  310.                     <xs:documentation>The location of a graphics file containing some visible representation of the severity, significance or other grouping of the associated element.
  311.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  312.                 </xs:annotation>
  313.             </xs:attribute>
  314.             <xs:attribute ref="xml:lang"/>
  315.             <xs:anyAttribute namespace="##other" processContents="lax"/>
  316.         </xs:complexType>
  317.     </xs:element>
  318.     <xs:element name="pattern">
  319.         <xs:annotation>
  320.             <xs:documentation>
  321.                 A structure, simple or complex. A set of rules giving constraints that are in some way related.                
  322.                 <br/>When a pattern element has the attribute abstract with a value true, then the pattern defines an abstract pattern. 
  323.                 An abstract pattern shall not have a is-a attribute and shall have an id attribute.
  324.                 <br/>When a pattern element has the attribute is-a with a value specifying the name of an abstract pattern, 
  325.                 then the pattern is an instance of an abstract pattern. Such a pattern shall not contain any rule elements, 
  326.                 but shall have param elements for all parameters used in the abstract pattern.
  327.             </xs:documentation>
  328.         </xs:annotation>
  329.         <xs:complexType>
  330.             <xs:sequence>
  331.                 <xs:element ref="p" minOccurs="0" maxOccurs="unbounded"/>
  332.                 <xs:element ref="sch:rule" maxOccurs="unbounded"/>
  333.             </xs:sequence>
  334.             <xs:attribute name="name" type="xs:string" use="required">
  335.                 <xs:annotation>
  336.                     <xs:documentation>
  337.                         The title of the current pattern
  338.                     </xs:documentation>
  339.                 </xs:annotation>
  340.             </xs:attribute>
  341.             <xs:attribute name="see" type="xs:anyURI">
  342.                 <xs:annotation>
  343.                     <xs:documentation>
  344.                         The URI of external information of interest to maintainers and users of the schema.
  345.                         <br/>An implementation is not required to make use of this attribute.
  346.                     </xs:documentation>
  347.                 </xs:annotation>
  348.             </xs:attribute>
  349.             <xs:attribute name="id" type="xs:ID">
  350.                 <xs:annotation>
  351.                     <xs:documentation>
  352.                         The id attribute provides a unique name for the pattern and is required for abstract patterns.
  353.                     </xs:documentation>
  354.                 </xs:annotation>
  355.             </xs:attribute>
  356.             <xs:attribute name="icon" type="xs:anyURI">
  357.                 <xs:annotation>
  358.                     <xs:documentation>The location of a graphics file containing some visible representation of the severity, significance or other grouping of the associated element.
  359.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  360.                 </xs:annotation>
  361.             </xs:attribute>
  362.         </xs:complexType>
  363.     </xs:element>
  364.     <xs:element name="phase">
  365.         <xs:annotation>
  366.             <xs:documentation>
  367.                 A grouping of patterns, to name and declare variations in schemas, for example, to support progressive 
  368.                 validation. The implementation determines which phase to use for validating documents, for example by user command.<br/>
  369.                 Two names, #ALL and #DEFAULT, have special meanings. The name #ALL is reserved and available for use by 
  370.                 implementations to denote that all patterns are active. The name #DEFAULT is reserved and available for
  371.                 use by implementations to denote that the name given in in the defaultPhase attribute on the schema element
  372.                 should be used. If no defaultPhase is specified, then all patterns are active.
  373.                 NOTE:<br/>
  374.                 The names #ALL and #DEFAULT shall not be used in a Schematron schema. They are for use when invoking or 
  375.                 configuring schema validation, for example as a command-line parameter.
  376.                 <br/>
  377.                 The icon, see and fpi attributes allow rich interfaces and documentation.
  378.             </xs:documentation>
  379.         </xs:annotation>
  380.         <xs:complexType>
  381.             <xs:sequence>
  382.                 <xs:element ref="sch:p" minOccurs="0" maxOccurs="unbounded"/>
  383.                 <xs:element ref="sch:active" maxOccurs="unbounded"/>
  384.             </xs:sequence>
  385.             <xs:attribute name="id" type="xs:string" use="required">
  386.                 <xs:annotation>
  387.                     <xs:documentation>
  388.                         The required id attribute is the name of the phase. 
  389.                     </xs:documentation>
  390.                 </xs:annotation>
  391.             </xs:attribute>
  392.             <xs:attribute name="fpi" type="xs:string">
  393.                 <xs:annotation>
  394.                     <xs:documentation>
  395.                         A formal public identifier for the schema, phase or other element.<br/>
  396.                         An implementation is not required to make use of this attribute
  397.                     </xs:documentation>
  398.                 </xs:annotation>
  399.             </xs:attribute>
  400.             <xs:attribute name="icon" type="xs:anyURI">
  401.                 <xs:annotation>
  402.                     <xs:documentation>The location of a graphics file containing some visible representation of the severity, significance or other grouping of the associated element.
  403.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  404.                 </xs:annotation>
  405.             </xs:attribute>
  406.         </xs:complexType>
  407.     </xs:element>
  408.     <xs:element name="report">
  409.         <xs:annotation>
  410.             <xs:documentation>
  411.                 An assertion made about the context nodes. The data content is a natural-language assertion. 
  412.                 <br/>
  413.                 The natural-language assertion shall be a positive statement of a found pattern or a negative 
  414.                 statement of a constraint.
  415.                 NOTE:<br/>    The natural-language assertion may contain information about actual values in addition to 
  416.                 expected values and may contain diagnostic information. Users should note, however,that the diagnostic                 
  417.                 element is provided for such information to encourage clear statement of the natural-language assertion.
  418.                 <br/>
  419.                 The icon, see and fpi attributes allow rich interfaces and documentation.<br/>
  420.                 The flag attribute allows more detailed outcomes.<br/>
  421.                 The role and subject attributes allow explicit identification of some part of a pattern.<br/>
  422.             </xs:documentation>
  423.         </xs:annotation>
  424.         <xs:complexType mixed="true">
  425.             <xs:choice minOccurs="0" maxOccurs="unbounded">
  426.                 <xs:element ref="sch:name"/>
  427.                 <xs:element ref="sch:emph"/>
  428.                 <xs:element ref="sch:dir"/>
  429.                 <xs:element ref="sch:span"/>
  430.                 <xs:any namespace="##other" processContents="lax"/>
  431.             </xs:choice>
  432.             <xs:attribute name="test" type="xs:string" use="required">
  433.                 <xs:annotation>
  434.                     <xs:documentation>
  435.                         The required test attribute is an assertion test evaluated in the current context. 
  436.                         If the test evaluates positive, the report succeeds.
  437.                     </xs:documentation>
  438.                 </xs:annotation>
  439.             </xs:attribute>
  440.             <xs:attribute name="role" type="xs:NMTOKEN">
  441.                 <xs:annotation>
  442.                     <xs:documentation>A name describing the function of the assertion or context node in the pattern. If the assertion has a subject attribute, then the role labels the arc between the context node and any nodes which match the path expression given by the subject attribute.
  443.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  444.                 </xs:annotation>
  445.             </xs:attribute>
  446.             <xs:attribute name="id" type="xs:string">
  447.                 <xs:annotation>
  448.                     <xs:documentation>
  449.                         The unique identifier with the schema for the report element.
  450.                     </xs:documentation>
  451.                 </xs:annotation>
  452.             </xs:attribute>
  453.             <xs:attribute name="diagnostics" type="xs:IDREFS">
  454.                 <xs:annotation>
  455.                     <xs:documentation>
  456.                         The optional diagnostics attribute is a reference to further diagnostic information.
  457.                     </xs:documentation>
  458.                 </xs:annotation>
  459.             </xs:attribute>
  460.             <xs:attribute name="icon" type="xs:anyURI">
  461.                 <xs:annotation>
  462.                     <xs:documentation>The location of a graphics file containing some visible representation of the severity, significance or other grouping of the associated element.
  463.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  464.                 </xs:annotation>
  465.             </xs:attribute>
  466.             <xs:attribute name="subject" type="xs:string" default=".">
  467.                 <xs:annotation>
  468.                     <xs:documentation>A path allowing more precise specification of nodes. 
  469.                         The path expression is evaluated in the context of the context node of the current rule. 
  470.                         If no subject attribute is specified, the current subject node may be used.
  471.                         NOTE:<br/>                        
  472.                         The subject attribute is required because the rule context may have been selected for reasons of convenience or performance,
  473.                         in association with the particular assertion tests. In such cases, the rule context may not be useful to identify users,
  474.                         and the nodes located by the subject attribute may be more useful. Similarly, it may not be possible to determine from an 
  475.                         assertion test which nodes the assertion test has tested. In such a case, the nodes located by the 
  476.                         subject attribute may be more useful.
  477.                     </xs:documentation>
  478.                 </xs:annotation>
  479.             </xs:attribute>
  480.             <xs:attribute ref="xml:lang"/>
  481.         </xs:complexType>
  482.     </xs:element>
  483.     <xs:element name="rule">
  484.         <xs:annotation>
  485.             <xs:documentation>
  486.                 A list of assertions tested within the context specified by the required context attribute.
  487.                 NOTE:<br/>
  488.                 It is not an error if a rule never fires in a document. In order to test that a document always has 
  489.                 some context, a new pattern should be created from the context of the document, with an assertion
  490.                 requiring the element or attribute.<br/>
  491.                 The icon, see and fpi attributes allow rich interfaces and documentation.<br/>
  492.                 The flag attribute allows more detailed outcomes.<br/>
  493.                 The role and subject attributes allow explicit identification of some part of a
  494.                 pattern as part of the validation outcome.<br/>
  495.                 When the rule element has the attribute abstract with a value true, then the rule is an abstract rule. 
  496.                 An abstract rule shall not have a context attribute. An abstract rule is a list of assertions that will be
  497.                 invoked by other rules belonging to the same pattern using the extends element. Abstract rules provide a mechanism 
  498.                 for reducing schema size.
  499.             </xs:documentation>
  500.         </xs:annotation>
  501.         <xs:complexType>
  502.             <xs:choice maxOccurs="unbounded">
  503.                 <xs:element ref="sch:assert"/>
  504.                 <xs:element ref="sch:report"/>
  505.                 <xs:element ref="sch:key"/>
  506.                 <xs:element ref="sch:extends"/>
  507.             </xs:choice>
  508.             <xs:attribute name="context" type="xs:string">
  509.                 <xs:annotation>
  510.                     <xs:documentation>
  511.                         The context attribute specifies the rule context expression.
  512.                     </xs:documentation>
  513.                 </xs:annotation>
  514.             </xs:attribute>
  515.             <xs:attribute name="abstract" type="xs:boolean" default="false">
  516.                 <xs:annotation>
  517.                     <xs:documentation>
  518.                         When the rule element has the attribute abstract with a value true, then the rule is an abstract rule.
  519.                     </xs:documentation>
  520.                 </xs:annotation>
  521.             </xs:attribute>
  522.             <xs:attribute name="role" type="xs:NMTOKEN">
  523.                 <xs:annotation>
  524.                     <xs:documentation>A name describing the function of the assertion or context node in the pattern. If the assertion has a subject attribute, then the role labels the arc between the context node and any nodes which match the path expression given by the subject attribute.
  525.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  526.                 </xs:annotation>
  527.             </xs:attribute>
  528.             <xs:attribute name="id" type="xs:string">
  529.                 <xs:annotation>
  530.                     <xs:documentation>
  531.                         The unique identifier with the schema for the rule element.
  532.                     </xs:documentation>
  533.                 </xs:annotation>
  534.             </xs:attribute>
  535.         </xs:complexType>
  536.     </xs:element>
  537.     <xs:element name="schema">
  538.         <xs:annotation>
  539.             <xs:documentation>
  540.                 The top-level element of a Schematron schema.                
  541.             </xs:documentation>
  542.         </xs:annotation>
  543.         <xs:complexType>
  544.             <xs:sequence>
  545.                 <xs:element ref="sch:title" minOccurs="0"/>
  546.                 <xs:element ref="sch:ns" minOccurs="0" maxOccurs="unbounded"/>
  547.                 <xs:element ref="sch:p" minOccurs="0" maxOccurs="unbounded"/>
  548.                 <xs:element ref="sch:phase" minOccurs="0" maxOccurs="unbounded"/>
  549.                 <xs:element ref="sch:pattern" maxOccurs="unbounded"/>
  550.                 <xs:element ref="sch:p" minOccurs="0" maxOccurs="unbounded"/>
  551.                 <xs:element ref="sch:diagnostics" minOccurs="0"/>
  552.             </xs:sequence>
  553.             <xs:attribute name="id" type="xs:ID">
  554.                 <xs:annotation>
  555.                     <xs:documentation>
  556.                         This attribute enables unique identification of the element. According to
  557.                         XML specification the value of an attribute of ID type can contain only characters 
  558.                         permitted for NMTOKEN and must start with a letter. No element type may have more than one 
  559.                         ID attribute specified. The value of an ID attribute must be unique between all values of all
  560.                         ID attributes.
  561.                     </xs:documentation>
  562.                 </xs:annotation>
  563.             </xs:attribute>
  564.             <xs:attribute name="fpi" type="xs:string">
  565.                 <xs:annotation>
  566.                     <xs:documentation>
  567.                         A formal public identifier for the schema, phase or other element.<br/>
  568.                         An implementation is not required to make use of this attribute
  569.                     </xs:documentation>
  570.                 </xs:annotation>
  571.             </xs:attribute>
  572.             <xs:attribute name="schemaVersion" type="xs:string">
  573.                 <xs:annotation>
  574.                     <xs:documentation>
  575.                         The optional schemaVersion attribute gives the version of the schema.
  576.                         Its allowed values are not defined by this part of ISO/IEC 19757 and its use is implementation-dependent.
  577.                     </xs:documentation>
  578.                 </xs:annotation>
  579.             </xs:attribute>
  580.             <xs:attribute name="defaultPhase" type="xs:string">
  581.                 <xs:annotation>
  582.                     <xs:documentation>
  583.                         The defaultPhase attribute may be used to indicate the phase to use in the absence of explicit user-supplied information.
  584.                     </xs:documentation>
  585.                 </xs:annotation>
  586.             </xs:attribute>
  587.             <xs:attribute name="icon" type="xs:anyURI">
  588.                 <xs:annotation>
  589.                     <xs:documentation>The location of a graphics file containing some visible representation of the severity, significance or other grouping of the associated element.
  590.                         <br/>An implementation is not required to make use of this attribute.</xs:documentation>
  591.                 </xs:annotation>
  592.             </xs:attribute>
  593.             <xs:attribute name="ns" type="xs:anyURI">
  594.                 <xs:annotation>
  595.                     <xs:documentation>
  596.                         The ns attribute gives the namespace URI.
  597.                     </xs:documentation>
  598.                 </xs:annotation>
  599.             </xs:attribute>
  600.             <xs:attribute name="version" type="xs:string" default="1.5">
  601.                 <xs:annotation>
  602.                     <xs:documentation>
  603.                         The version of Schematron the schema is conforming to.
  604.                     </xs:documentation>
  605.                 </xs:annotation>
  606.             </xs:attribute>
  607.             <xs:attribute ref="xml:lang"/>
  608.             <xs:anyAttribute namespace="##other" processContents="lax"/>
  609.         </xs:complexType>
  610.         <xs:unique name="assertId">
  611.             <xs:selector xpath="sch:pattern/sch:rule/sch:assert"/>
  612.             <xs:field xpath="@id"/>
  613.         </xs:unique>
  614.         <xs:unique name="reportId">
  615.             <xs:selector xpath="sch:pattern/sch:rule/sch:report"/>
  616.             <xs:field xpath="@id"/>
  617.         </xs:unique>
  618.         <xs:unique name="ruleId">
  619.             <xs:selector xpath="sch:pattern/sch:rule"/>
  620.             <xs:field xpath="@id"/>
  621.         </xs:unique>
  622.         <xs:unique name="patternId">
  623.             <xs:selector xpath="sch:pattern"/>
  624.             <xs:field xpath="@id"/>
  625.         </xs:unique>
  626.         <xs:unique name="pId">
  627.             <xs:selector xpath=".//sch:p"/>
  628.             <xs:field xpath="@id"/>
  629.         </xs:unique>
  630.         <xs:key name="phaseId">
  631.             <xs:selector xpath="sch:phase"/>
  632.             <xs:field xpath="@id"/>
  633.         </xs:key>
  634.         <xs:keyref name="activePattern" refer="patternId">
  635.             <xs:selector xpath="sch:phase/sch:active"/>
  636.             <xs:field xpath="@pattern"/>
  637.         </xs:keyref>
  638.         <xs:keyref name="extendsRule" refer="ruleId">
  639.             <xs:selector xpath="sch:pattern/sch:rule/sch:extends"/>
  640.             <xs:field xpath="@rule"/>
  641.         </xs:keyref>
  642.         <xs:keyref name="defaultPhase" refer="phaseId">
  643.             <xs:selector xpath="."/>
  644.             <xs:field xpath="@defaultPhase"/>
  645.         </xs:keyref>
  646.         <!-- Define the identity constraints -->
  647.     </xs:element>
  648.     <xs:element name="span">
  649.         <xs:annotation>
  650.             <xs:documentation>
  651.                 A portion of some paragraph that should be rendered in a distinct way, keyed with the class attribute.<br/>
  652.                 An implementation is not required to make use of this element.                
  653.             </xs:documentation>
  654.         </xs:annotation>
  655.         <xs:complexType>
  656.             <xs:simpleContent>
  657.                 <xs:extension base="xs:string">
  658.                     <xs:attribute name="class" type="xs:string">
  659.                         <xs:annotation>
  660.                             <xs:documentation>
  661.                                 An attribute that can be used for stylesheet style
  662.                             </xs:documentation>
  663.                         </xs:annotation>
  664.                     </xs:attribute>
  665.                 </xs:extension>
  666.             </xs:simpleContent>
  667.         </xs:complexType>
  668.     </xs:element>
  669.     <xs:element name="title">
  670.         <xs:annotation>
  671.             <xs:documentation>
  672.                 A summary of the purpose or role of the schema or pattern, for the purpose of documentation or a rich user interface.
  673.                 <br/>An implementation is not required to make use of this element.
  674.             </xs:documentation>
  675.         </xs:annotation>
  676.         <xs:complexType mixed="true">
  677.             <xs:choice minOccurs="0" maxOccurs="unbounded">
  678.                 <xs:element ref="sch:dir"/>
  679.             </xs:choice>
  680.         </xs:complexType>
  681.     </xs:element>
  682.     <xs:element name="value-of">
  683.         <xs:annotation>
  684.             <xs:documentation>
  685.                 Finds or calculates values from the instance document to allow clearer assertions and diagnostics.
  686.                 <br/>
  687.                 Variable references in the select attribute are resolved in the scope of the current schema, phase, pattern and rule.<br/>
  688.                 An implementation which does not report natural-language assertions is not required to make use of this element.<br/>
  689.             </xs:documentation>
  690.         </xs:annotation>
  691.         <xs:complexType>
  692.             <xs:attribute name="select" type="xs:string" use="required">
  693.                 <xs:annotation>
  694.                     <xs:documentation>
  695.                         The required select attribute is an expression evaluated in the current context that returns a string.
  696.                     </xs:documentation>
  697.                 </xs:annotation>
  698.             </xs:attribute>
  699.         </xs:complexType>
  700.     </xs:element>
  701. </xs:schema>
  702.