- From: Jos de Bruijn <debruijn@inf.unibz.it>
- Date: Mon, 28 Jan 2008 18:53:19 +0100
- To: RIF WG <public-rif-wg@w3.org>
- Message-ID: <479E168F.8010808@inf.unibz.it>
Dear all,
This e-mail contains a proposal for the incorporation of annotations in RIF.
== prelude ==
We distinguish between two kinds of annotations:
1 annotations which can be ignored for rule set processing (e.g.,
author, date, title, natural language description); we call these
annotations *metadata*
2 annotations which cannot be ignored for rule set processing (e.g.,
imports, data set references); we call these annotations *attributes*
[this name is not very good; suggestions are welcome]
Annotations can be written about any rule set or rule.
Since metadata can be ignored for rule set processing, we do not
restrict the metadata properties which can be used in any dialect.
Attribute properties cannot be ignored; in fact, all attribute
properties must be understood by anyone who processes rule sets of a
particular dialect. Therefore, every dialect has a fixed set of
attributes properties which may be used.
Suggested attribute properties for BLD: rif:imports,
rif:requiresDataSet, rif:dataModel (see [1] for a description of the
rif:requiresDataSet and rif:dataModel properties).
== Extension of the presentation syntax ==
The syntax for rule sets and rules needs to be extended to allow for
rule set and rule identification. Furthermore, it is convenient to
group annotations together with rule sets and rules. Finally, it is
currently foreseen that rule sets can have both metadata and attributes,
and rules can only have metadata. We propose the following modification
of the grammar:
Ruleset ::= ' Ruleset( ' iri? Attribute* Metadata* RULE* ' ) '
Attribute ::= ' Attribute ( ' iri Const ' ) '
Metadata ::= ' Metadata ( ' iri Const ' ) '
RULE ::= ' Rule( ' iri? Metadata* RuleContent ' ) '
RuleContent ::= ' Forall ' Var+ ' ( ' RULE ' ) ' | Implies | ATOMIC
Implies ::= ATOMIC ' :- ' CONDITION
Metadata properties can be any IRI; each RIF dialect prescribes a fixed
list of attributes properties.
Neither attributes nor metadata are reflected in the model theory.
If it is deemed necessary that arbitrary metadata statements (not only
about rule sets and rules) can be added, the following change could be
made to the Ruleset production:
Ruleset ::= ' Ruleset( ' iri? Attribute* Metadata* (RULE |
MetadataStatement)* ' ) '
MetadataStatement ::= ' MetadataStatement ( ' Const iri Const ' ) '
== Extension of the XML syntax ==
Ruleset( rs1
Attribute("a1"^^rif:iri "v1"^^rif:iri)
Attribute("a2"^^rif:iri "v2"^^xsd:string)
Metadata("a3"^^rif:iri "v3"^^xsd:string)
Metadata("a4"^^rif:iri "v4"^^rif:iri)
Rule( r1
Metadata("a5"^^rif:iri "v5"^^xsd:string)
....
)
)
translates to
<Ruleset rif:identifier="rs1">
<Attribute rif:identifier="a1" type="rif:iri">v1</Attribute>
<Attribute rif:identifier="a2" type="xsd:string">v2</Attribute>
<Metadata rif:identifier="a3" type="xsd:string">v3</Metadata>
<Metadata rif:identifier="a4" type="rif:iri">v4</Metadata>
<Rule rif:identifier="r1">
<Metadata rif:identifier="a5" type="xsd:string">v5</Metadata>
....
</Rule>
</Ruleset>
best, Jos
[1] http://www.w3.org/2005/rules/wg/wiki/Arch/Data_Sets
--
Jos de Bruijn debruijn@inf.unibz.it
+390471016224 http://www.debruijn.net/
----------------------------------------------
Doubt is not a pleasant condition, but
certainty is absurd.
- Voltaire
Received on Monday, 28 January 2008 17:53:50 UTC