XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] RE: Schematron Best Practice: A Schematron schema's area of responsibility?

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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS