Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] RE: Schematron Best Practice: A Schematron schema's area of responsibility?

From: "Rick Jelliffe" <rjelliffe@-------.---.-->
To: "Costello, Roger L." <costello@-----.--->
Date: 7/5/2007 12:20:00 AM
I think the examples don't go far enough. Traceability from requirement to
implementation is terribly important, so that spurious constraints are not
introduced, so that the successful implementation of requirements can be
ascertained, and so that requirements that have unworkable ramifications
can be identified. For a large system, a non-traceable constraint is a
loose cannon.

In Schematron, you add traceability in the assertion text by adding a
"because" clause. In both Schematron and XSD you can add foreign attribute
or elements respectively for traceability metadata (e.g. an ID reference)
and both provide for documentation by URL refences.

    <attribute name="classification">
        <annotation >
          <appinfo source="http://www.eg.com/military/security.html">
             <my:requirement idref="A.1.3.4.5" />
          </appinfo>
          <documentation>
              The value of a classification must be one of top-secret,
              secret, confidential, or unclassified, because of MILSPEC
              XXXX (1999) section A.2.
          </documentation>
        </annotation>
        <simpleType>
            <enumeration value="top-secret" />
            <enumeration value="secret" />
            <enumeration value="confidential" />
            <enumeration value="unclassified" />
        </simpleType>
    </attribute>


    <sch:pattern name="Classifications">
       <sch:rule context="*[@classification]">
          <sch:assert test="@classification='top-secret' or
                            @classification='secret' or
                            @classification='confidential' or
                            @classification='unclassified'"
                  my:requirement="A.1.2.3.4.5"
                  see="http://www.eg.com/military/security.html">
              The value of a classification must be one of top-secret,
              secret, confidential, or unclassified, because of MILSPEC
              XXXX (1999) section A.2.
          </sch:assert>
       </sch:rule>
    </sch:pattern>

So even though both XSD and Schematron are quite matched for the
information they can carry, in Schematron you would expect that the user
would get the full text, while in XSD you have to try to try to figure out
how to make your application deliver annotation information as part of the
user message.

Cheers
Rick Jelliffe


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent