Schematron Schema Constraint Mechanism (SSCM)

Version 1.0

Authors

Scott Hinkelman, IBM

Copyright Notice

IBM hereby grants you permission to copy and display the Schematron Schema Constraint Mechanism specification, in any medium without fee or royalty, provided that you include the following on all copies of the Schematron Schema Constraint Mechanism specification, or portions thereof that you make:

1.      A link or URL to the specification at this location

2.      The copyright notice as shown in the Schematron Schema Constraint Mechanism specification.

EXCEPT FOR THE COPYRIGHT LICENSE GRANTED ABOVE, IBM DOES NOT GRANT, EITHER EXPRESSLY OR IMPLIEDLY, A LICENSE TO ANY INTELLECTUAL PROPERTY, INCLUDING PATENTS, THEY OWN OR CONTROL. IBM MAY HAVE PATENTS, PATENT APPLICATIONS, TRADEMARKS, COPYRIGHTS, OR OTHER INTELLECTUAL PROPERTY RIGHTS COVERING SUBJECT MATTER IN THIS DOCUMENT.

THE INFORMATION CONSTRAINT FRAMEWORK SPECIFICATION IS PROVIDED "AS IS," AND IBM MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SCHEMATRON SCHEMA CONSTRAINT MECHANISM SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

IBM WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS SPECIFICATION.

The Schematron Schema Constraint Mechanism specification may change before final release and you are cautioned against relying on the content of this specification.

The name and trademarks of IBM may NOT be used in any manner, including advertising or publicity pertaining to the specification or its contents without specific, written prior permission. Title to copyright in the Schematron Schema Constraint Mechanism specification will at all times remain with IBM.

No other rights are granted by implication, estoppel or otherwise.

Abstract

The Schematron Schema Constraint Mechanism specification (sometimes referred to as “SSCM”) provides a Schematron schema specific concrete information constraint mechanism type for the Business Information Conformance Statement specification.

SSCM enables instances of Schematron schema to become an information constraint within the information constraint processing model of a Business Information Conformance Statement.

Status

This specification is an initial public draft release and is provided for review and evaluation only. IBM makes no warrantees or representations regarding the specifications in any manner whatsoever.

Table of Contents

1 Introduction

1.1 Notational Conventions

1.2 Namespaces

2 Example

2.1 Single Schematron Schema Constraint In-line

2.2 Specifying Schematron Schema Constraints by Reference

3 Structural Semantics

3.1 complexType SchematronInformationConstraintMechanismType

3.2 Distinguished TypeName for Instance Documents

4 References

A1 Formal W3C XML Schema

1 Introduction

Business information can be declared as adhering to specific constraint mechanisms. Various constraint mechanisms are utilized in industry.

The Business Information Conformance Statement (BICS) specification [BICS] provides a formal XML vocabulary providing the ability to declare statements of constraints for business information based in an information constraint processing model. The BICS specification specifies a top level Information Conformance Statement as an XML document structure, several common possible constraint processing models, and an abstract Information Constraint Mechanism Type. This specification defines a concrete information constraint mechanism type to allow instances of Schematron schema to exist within a Business Information Conformance Statement as a constraint mechanism.

Refer to the Business Information Conformance Statement [BICS] specification for increased details.

1.1 Notational Conventions

The keywords [keywords] "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC2119 [RFC2119].

1.2 Namespaces

The XML namespace names [XMLNamespace] URIs [URIs] defined by this specification is as follows:

       http://ibm.com/xml/namespaces/schematroninformationconstraint

2 Example

In order to use the Business Information Conformance Statement within an XML instance document, an importing W3C XML Schema must be defined that provides a concrete subtype of the InformationConstraintMechanismType type from the Business Information Conformance Statement namespace. Once a concrete constraint mechanism is defined, an XML instance document is then based on the BICS schema and makes use of the concrete subtype within a constraint processing model.

This specification defines such a concrete subtype, and this section shows fictitious examples of utilizing the subtype in BICS.

2.1 Single Schematron Schema Constraint In-line

The following BICS states that if the Schematron Schema constraint mechanism is applied with no errors to the information under discussion, that the information is considered conformant.

In this example, the Schematron Schema constraint is the only constraint within the statement, and it exists in-line within a sequential constraint processing model.

[1] <?xml version="1.0" encoding="UTF-8"?>

[2] <InformationConformanceStatement xmlns="http://ibm.com/xml/namespaces/businessinformationconformancestatement" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sscm="http://ibm.com/xml/namespaces/schematroninformationconstraint" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ibm.com/xml/namespaces/businessinformationconformancestatement

[3] ./businessinformationconformancestatement.xsd http://ibm.com/xml/namespaces/schematroninformationconstraint

[4] ./schematronmechanism.xsd">

[5]   <Description>This conformance statement defines a single Schematron Schema existing inline.</Description>

[6]   <InformationConstraintProcessingModel modelType="sequence">

[7]     <InformationConstraint xsi:type="sscm:SchematronInformationConstraintMechanismType">

[8]     <Name>test for member education information</Name>

[9]     <TypeName>Schematron Constraint Mechanism</TypeName>

[10]       <Description>This constraint mechanism, a Schematron Schema containing an assertion test of member information, is located in-line with this constraint statement.</Description>

[11]       <schema xmlns="http://www.ascc.net/xml/schematron">

[12]         <pattern name="Print an error if there is no eductaion information.">

[13]           <rule context="Member">

[14]             <assert test="EducationInfoCheck">Education info is missing.</assert>

[15]           </rule>

[16]         </pattern>

[17]       </schema>

[18]     </InformationConstraint>

[19]   </InformationConstraintProcessingModel>

[20] </InformationConformanceStatement>

Lines (002) to (004) define the top-level element, namespaces, etc.

Line (005) provides a description of the BICS.

Lines (006) to (019) define the constraint processing model of the statement. The attribute on line (006) defines the constraint processing model as a sequential model. In this example, there is only one constraint, but if more than one existed, each constraint would have to be considered in order.

Lines (007) to (018) define the first (and only) InformationConstraint within the processing model. This constraint is of the concrete SchematronInformationConstraintMechanismType type as indicated by the xsi:type attribute.

Line (008) provides a name of the constraint.

Line (009) defines the name of the constraint type.

Line (010) provides a description of the constraint.

Lines (011) through (017) define a Schematron Schema constraint instance in-line to the conformance statement.

2.2 Specifying Schematron Schema Constraints by Reference

Within a BICS, a constraint may exist either in-line, as in the previous example, or by referring to a URL. In either case, the subtype of the concrete constraint mechanism is specified in the BICS.

The following BICS refers to a single Schematron Schema constraint mechanism by referring its URL.

[1] <?xml version="1.0" encoding="UTF-8"?>

[2] <InformationConformanceStatement xmlns="http://ibm.com/xml/namespaces/businessinformationconformancestatement" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sscm="http://ibm.com/xml/namespaces/schematroninformationconstraint" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ibm.com/xml/namespaces/businessinformationconformancestatement

[3] ./businessinformationconformancestatement.xsd http://ibm.com/xml/namespaces/schematroninformationconstraint

[4] ./schematronmechanism.xsd">

[5]   <Description>This conformance statement defines a single Schematron Schema constraint by referencing a URL.</Description>

[6]   <InformationConstraintProcessingModel modelType="sequence"> 

[7]     <InformationConstraint xsi:type="sscm:SchematronInformationConstraintMechanismType">

[8]     <Name>require member education constraint</Name>

[9]     <TypeName>Schematron Constraint Mechanism</TypeName>

[10]       <Description>This constraint mechanism, a Schematron Schema for member information, is located at the URL below.</Description>

[11]       <ProcessableConstraintURL>http://members.org/constraintmechanisms/schematronschema/educationrequiredmember.xml</ProcessableConstraintURL>

[12]     </InformationConstraint>

[13]   </InformationConstraintProcessingModel>

[14] </InformationConformanceStatement>

Lines (002) to (004) define the top-level element, namespaces, etc.

Line (005) defines a description of the conformance statement.

Lines (006) to (013) define the constraint processing model of the statement. The attribute on line (006) defines the constraint processing model as a sequential model.

Lines (007) to (012) define the first (and only) InformationConstraint within the processing model. This constraint is of the concrete SchematronInformationConstraintMechanismType type as indicated by the xsi:type attribute.

Line (008) provides a name of the constraint.

Line (009) defines the name of the type of constraint mechanism.

Line (010) provides a description of the constraint.

Line (011) defines the location of the Schematron schema by using the ProcessableConstraintURL element from the BICS namespace.

3 Structural Semantics

This section defines the normative W3C XML Schema Constraint Mechanism vocabulary semantics as defined using W3C XML Schema representation.

3.1 complexType SchematronInformationConstraintMechanismType

Elements typed as SchematronInformationConstraintMechanismType type provide a Schematron schema specific concrete subtype of the InformationConstraintmechanismType from the BICS namespace.

This type defines an optional extension element referenced to a Schematron schema element within the http://www.ascc.net/xml/schematron namespace name.

If an in-line Schematron schema constraint is utilized within an instance document, the optional ProcessableConstraintURL within the base type has no meaning if present.

If an in-line Schematron schema constraint is not utilized within an instance document, the ProcessableConstraintURL within the base type is required, and represents the location of the default Schematron schema constraint.

<xs:complexType name="SchematronInformationConstraintMechanismType">

  <xs:complexContent>

    <xs:extension base="bics:InformationConstraintMechanismType">

      <xs:sequence>

        <xs:element ref="sch:schema" minOccurs="0"/>

      </xs:sequence>

    </xs:extension>

  </xs:complexContent>

</xs:complexType>

3.2 Distinguished TypeName for Instance Documents

Instance documents utilizing the SchematronInformationConstraintMechanismType must specify the a value of “Schematron Constraint Mechanism” for the <TypeName> element in the  http://ibm.com/xml/namespaces/businessinformationconformancestatement namespace name.

4 References

[keywords]

S. Bradner, "Key words for use in RFCs to Indicate Requirement Levels," RFC 2119, Harvard University, March 1997, http://www.ietf.org/rfc/rfc2119.txt

[URI]

T. Berners-Lee, R. Fielding, L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax," RFC 2396, MIT/LCS, U.C. Irvine, Xerox Corporation, August 1998, http://www.ietf.org/rfc/rfc2396.txt

[BICS]

     Business Information Conformance Statements version 2.0, ?

 [XMLNamespace]

W3C Recommendation, Namespaces in XML, http://www.w3.org/TR/1999/REC-xml-names-19990114

[XML]

Extensible Markup Language (XML) 1.0 (Second Edition), http://www.w3.org/TR/REC-xml

[XMLSchema1]

W3C Recommendation, XML Schema Part 1: Structures, http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/

[XMLSchema2]

W3C Recommendation, XML Schema Part 2: Datatypes, http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/

[Schematron]

An XML Structure Validation Language using Patterns in Trees, http://www.ascc.net/xml/resource/schematron

A1 Formal W3C XML Schema

<?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================

Schematron Schema Information Constraint Mechanism W3C XML Schema

Version 1.0

Copyright Notice

© 2005 International Business Machines Corporation, All rights reserved. The presentation, distribution, or other dissemination of the information contained in this specification is not a license, either expressly or impliedly, to any intellectual property owned or controlled by IBM. IBM may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. The furnishing of this document does not give you any license to IBM’s™ patents, trademarks, copyrights, or other intellectual property. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. This specification and the information contained herein is provided on an "AS IS" basis and to the maximum extent permitted by applicable law, IBM provides the document AS IS AND WITH ALL FAULTS, and hereby disclaim all other warranties and conditions, either express, implied, or statutory, including, but not limited to, any (if any) implied warranties, duties, or conditions of merchantability, of fitness for a particular purpose, of accuracy or completeness of responses, of results, of workmanlike effort, of lack of viruses, and of lack of negligence, all with regard to the document. ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE DOCUMENT. IN NO EVENT WILL IBM BE LIABLE TO ANY OTHER PARTY FOR THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.

==================================================================== -->

<xs:schema targetNamespace="http://ibm.com/xml/namespaces/schematroninformationconstraint" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sic="http://ibm.com/xml/namespaces/schematroninformationconstraint" xmlns:bics="http://ibm.com/xml/namespaces/businessinformationconformancestatement" xmlns:sch="http://www.ascc.net/xml/schematron">

  <xs:import namespace="http://www.ascc.net/xml/schematron" schemaLocation="./schematron1-5.xsd"/>

  <xs:import namespace="http://ibm.com/xml/namespaces/bics" schemaLocation="./businessinformationconformancestatement.xsd"/>

  <xs:complexType name="SchematronInformationConstraintType">

    <xs:complexContent>

      <xs:extension base="bics:InformationConstraintMechanismType">

        <xs:sequence>

          <xs:element ref="sch:schema" minOccurs="0"/>

        </xs:sequence>

      </xs:extension>

    </xs:complexContent>

  </xs:complexType>

</xs:schema>

.