W3C home > Mailing lists > Public > public-rif-wg@w3.org > January 2008

Re: Annotations and metadata in RIF

From: Dave Reynolds <der@hplb.hpl.hp.com>
Date: Tue, 29 Jan 2008 15:46:50 +0000
Message-ID: <479F4A6A.8000908@hplb.hpl.hp.com>
To: Jos de Bruijn <debruijn@inf.unibz.it>
CC: RIF WG <public-rif-wg@w3.org>

Jos de Bruijn wrote:
> Dear all,
> 
> This e-mail contains a proposal for the incorporation of annotations in 
> RIF.

Good start. Some questions and comments embedded.

> == 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]

I agree we have this distinction at present, and your proposal cleanly 
separates them.

[We could choose to only support metadata and move everything else of 
semantic significance into the language - specifically imports and 
required datasets. I'm not sure this is the right approach but we should 
at least consider it.]

A possible alternative to the name "attributes" might be "processing 
instructions", not sure I like it but it's the only plausible option 
that has sprung to mind so far.

> 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.

For interoperability purposes I believe we should recommend a core 
vocabulary for metadata terms. In particular, I think that it will be 
quite common to want to give rules and rulesets a name, a longer 
descriptive comment (possibly multi-lingual), author attribution, 
creation dates and references to external documentation. If people in 
general use the same vocabulary for these then editors, viewers and 
other tools will be more functional and practical interoperation often 
benefits from being able to find things like comments.

Specifically for these meatadata terms I suggest:
    rdfs:label
    rdfs:comment
    dc:creator
    dc:date
    rdfs:seeAlso

> 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.

A nice simple approach but ...

(1) It would be useful to enable metadata property values to be 
structured. Specifically the proposal in [1] uses RDF resources and 
bNodes for this.

(2) I would like to have a documented mapping from our metadata syntax 
to RDF. This would *not* require an implementer to process the metadata 
as RDF nor be able to understand RDF syntax but would help (a) forestall 
questions at Last Call on the relationship, (b) allow us to use RDFS as 
in [1] to document the intended domain/ranges of the metadata 
properties. This mapping could be informative rather than normative.

> 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


Dave
-- 
Hewlett-Packard Limited
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England
Received on Tuesday, 29 January 2008 15:47:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:44 GMT