This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5112 - rule binding concept should move to sml
Summary: rule binding concept should move to sml
Status: RESOLVED FIXED
Alias: None
Product: SML
Classification: Unclassified
Component: Core+Interchange Format (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: LC
Assignee: Valentina Popescu
QA Contact: SML Working Group discussion list
URL:
Whiteboard:
Keywords:
: 5169 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-01 14:21 UTC by John Arwe
Modified: 2008-06-05 18:59 UTC (History)
2 users (show)

See Also:


Attachments

Description John Arwe 2007-10-01 14:21:14 UTC
Propose we move SMLIF 3.5.2 Bindings defined's first paragraph to SML.  The linkage between rule documents and model documents is part of the model's semantics, not some extra add-on SMLIF provides.  SML should define the rule binding concept and leave its syntax to dependent specs, just like it does for model def/instance docs.

Concurrently I propose we make the "binding" name more specific, to prepare us for other types of future bindings, e.g. schema docs, and better align with the actual SMLIF element name.  "binding" -> "rule binding"

If we choose instead to leave this content only in SMLIF, we would need to fix the "one or more" model documents in its definition to read "zero or more" since the SMLIF syntax allows one to specify a rule doc URI prefix that matches no rule documents.  Moving it to SML neatly sidesteps that question IMO.

This would entail the following changes:
SML Create new subsection 5.1 Rule bindings 
containing first paragraph from SMLIF 3.5.2 Bindings defined.

SML 5.1 Rule bindings 
from "A      binding is an association of a set of one or ..."
to   "A rule binding is an association of a set of one or ..."
("rule" also in italics)
optional: add "rule binding" to terminology section

SML 5.1 Rule bindings 
optional change below, but I find it clearer.  I think readers could easily miss the capability to bind rule documents to definition documents the existing text intentionally allows.
from "...every                            document in the model must conform to the constraints defined by every rule document..."
to   "...every definition and/or instance document in the model must conform to the constraints defined by every rule document..."

SMLIF 3.5.2 Bindings defined
from "3.5.2      Bindings defined"
to   "3.5.2 Rule Bindings        "

SMLIF 3.5.2 Bindings defined
remove first paragraph (part of moving it to SML 5.1)

SMLIF 3.5.2 Bindings defined
from "...SML-IF to express      bindings. In any..."
to   "...SML-IF to express rule bindings. In any..."
Comment 1 John Arwe 2007-10-01 15:37:44 UTC
Also note that 3.5.2 Bindings defined paragraph 1 (proposed move to SML) contains the following "For a model to be valid, every document in the model must conform to the constraints defined by every rule document it is bound to."

Since SMLIF does not require exchange of a valid model, it is pretty meaningless to make assertions about model validity in SMLIF.
Comment 2 John Arwe 2007-10-11 19:58:32 UTC
2007-10-11 telecon
agree need to add def of rule docs
from minutes: the conceptual proposal is to define the concept of binding and rule document in SML and to define the syntax by which rule documents are bound to instances in SML-IF. 

Comment 3 John Arwe 2007-10-25 19:08:33 UTC
2007-10-25 Making this editorial per 10/25 wg consensus.

Proposal is to:
Review both specs to ensure the terminology defined via bug 5112 is used consistently.
Comment 4 John Arwe 2007-10-25 19:09:13 UTC
*** Bug 5169 has been marked as a duplicate of this bug. ***
Comment 5 Valentina Popescu 2007-10-30 17:01:20 UTC
Changes :

1. In IF : Removed rule bindings definition from IF, section 5.4.2 ( moved under SML ).

Current content of section 5.4.2 in IF

5.4.2 Rule bindings
The ruleBinding element is used in SML-IF to express SML rule bindings. In any given binding the set of rule documents is that subset of rule documents in the interchange set with an alias that matches the URI prefix given by the content of the ruleAlias element. The set of model documents in the binding is that subset of the documents in the interchange set with an alias that matches the URI prefix given by the content of the documentAlias element. If the documentAlias element is omitted in a ruleBinding, the set of model documents in the binding is all documents in the interchange set.
Although SML-IF itself does not do so, various uses of SML-IF MAY choose to extend the sets of documents involved in bindings to include documents not contained in the interchange set. For example, if an SML-IF document is used to represent a model fragment that is intended to be merged with some other model, it is entirely possible that some or all of the bindings may involve not just the documents in the interchange set, but documents in the other model.


2. In SML
Added rule binding definition in SML under Terminology section ( John suggested to have a new section 5.1 Rule bindings but I found Terminology more appropriate since it already contains the definition for rule )

3. In SML, under Terminology, added a new definition for rule documents :
A rule document is an SML model definition document that conforms to the SML's profile of Schematron.

New content for Terminology section:

2.2 Terminology

Document
A well-formed XML document, as defined in [XML].

Model
A set of inter-related documents that describe a service or system.  Each model consists of two disjoint subsets of documents definition documents and instance documents.

Rule
A rule is a boolean expression that constrains the structure and content of a set of documents in a model. 

Rule document
A rule document is an SML model definition document that conforms to the SML's profile of Schematron.

Rule bindings
A rule binding is an association of a set of one or more rule documents with a set of zero or more model documents. The documents associated with a given rule document are said to be "bound" to it. For a model to be valid, every definition and/or instance document in the model must conform to the constraints defined by every rule document it is bound to. It is permissible for a rule document to have no bindings associated with it, and for a model document to be bound to zero rule documents.

Model Definition
The subset of documents in a model that describes the schemas and rules that govern the structure and content of the model's documents. This specification defines two types of model definition document - Schema documents that conform to XML Schema and rule documents that conform to SML's profile of Schematron  but permits implementations to define other types of model definition documents. Such other types of model definition documents do not play any role in SML model validation.

Model Instance
A model instance is the subset of documents in a model that describe the structure and content of the modeled entities.

Model Validation
The model validation is the process of verifying that all documents in a model are valid with respect to the model's definition documents.

Model Validator
A model validator is an embodiment capable of performing model validation

3. Changed SML section 5. Rules, second last paragraph
from:
Model validators that conform to this specification MUST provide a mechanism to support binding of Schematron patterns that are authored in separate documents, i.e., not embedded in schema definition, to a set of documents in a model.

To:
Model validators that conform to this specification MUST provide a mechanism to support binding of Schematron patterns, authored in separate rule documents, to a set of documents in a model.


Comment 6 Valentina Popescu 2007-10-30 17:09:58 UTC
Note that the following changes ( also described under comment #5 ) have been added to address defect 5169 closed as a dup of current bug :

1. New definition under Terminology section :

Rule document
A rule document is an SML model definition document that conforms to the SML's
profile of Schematron.


2. Changed SML section 5. Rules, second last paragraph
from:
Model validators that conform to this specification MUST provide a mechanism to
support binding of Schematron patterns that are authored in separate documents,
i.e., not embedded in schema definition, to a set of documents in a model.

To:
Model validators that conform to this specification MUST provide a mechanism to
support binding of Schematron patterns, authored in separate rule documents, to
a set of documents in a model.
Comment 7 Pratul Dublish 2007-11-12 03:47:17 UTC
Looks good - recommend closing this bug
Comment 8 Kumar Pandit 2007-11-14 08:37:50 UTC
I agree with the changes.
Comment 9 John Arwe 2007-11-15 17:42:59 UTC
As long as Terminology is marked as normative, and/or this text is covered elsewhere in a normative section, fine.  Since it is making a model validity assertion, that assertion must be present in a normative section.

For a model to be valid, every
definition and/or instance document in the model must conform to the
constraints defined by every rule document it is bound to. It is permissible
for a rule document to have no bindings associated with it, and for a model
document to be bound to zero rule documents.
Comment 10 Virginia Smith 2007-11-15 18:34:49 UTC
Bug #4811 added the following to the Conformance Section. The word "applicable" is used. Does this cover the concerns in comment #9?


=======
A conforming SML model is valid if it satisfies all of the following
conditions:

   1. In each instance document in the model, the [validity] property of the
root element and all of its attributes and descendants MUST NOT be "invalid"
when schema validity is assessed by a conforming schema-aware processor with
respect to the referenced XML Schema documents in the model's definition
documents. [XML Schema Structures]
   2. Each document in the model MUST satisfy all applicable Schematron
constraints constraints when validated in the #ALL phase.
   3. Each document in the model MUST satisfy all applicable sml:acyclic and
sml:target* constraints.
   4. Each document in the model MUST satisfy all applicable SML identity
constraints.
=======