W3C

PROV-N: The Provenance Notation

WD5 for internal review

W3C Editor's Draft 02 April 2012

This version:
http://dvcs.w3.org/hg/prov/raw-file/default/model/prov-n.html
Latest published version:
http://www.w3.org/TR/prov-n/
Latest editor's draft:
http://dvcs.w3.org/hg/prov/raw-file/default/model/prov-n.html
Previous version:
none
Editors:
Luc Moreau, University of Southampton
Paolo Missier, Newcastle University

Abstract

PROV-DM, the PROV data model, is a data model for provenance that describes the entities, people and activities involved in producing a piece of data or thing. PROV-DM is structured in six components, dealing with: (1) entities and activities, and the time at which they were created, used, or ended; (2) agents bearing responsibility for entities that were generated and actities that happened; (3) derivations between entities; (4) properties to link entities that refer to a same thing; (5) collections of entities, whose provenance can itself be tracked; (6) a simple annotation mechanism.

To provide examples of the PROV data model, the PROV notation (PROV-N) is introduced: aimed at human consumption, PROV-N allows serializations of PROV-DM instances to be created in a compact manner. PROV-N facilitates the mapping of the PROV data model to concrete syntax, and is used as the basis for a formal semantics of PROV-DM. The purpose of this document is to define the PROV-N notation.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

PROV Family of Specifications

This document is part of the PROV family of specifications, a set of specifications aiming to define the various aspects that are necessary to achieve the vision of inter-operable interchange of provenance information in heterogeneous environments such as the Web. The specifications are as follows.

How to read the PROV Family of Specifications

Fourth Public Working Draft

This is the fourth public release of the PROV-DM document. Following feedback, the Working Group has decided to reorganize this document substantially, separating the data model, from its contraints, and the notation used to illustrate it. The PROV-DM release is synchronized with the release of the PROV-O, PROV-PRIMER, PROV-N, PROV-DM-CONSTRAINTS documents. We are now making clear what the entry path to the PROV family of specifications is.

This document was published by the Provenance Working Group as an Editor's Draft. If you wish to make comments regarding this document, please send them to public-prov-wg@w3.org (subscribe, archives). All feedback is welcome.

Publication as an Editor's Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1. Introduction

Provenance is defined as a record that describes the people, institutions, entities, and activities, involved in producing, influencing, or delivering a piece of data or a thing in the world. Two companion specifications respectively define PROV-DM, a data model for provenance, allowing provenance descriptions to be expressed [PROV-DM] and a set of constraints that provenance descriptions are expected to satisfy [PROV-DM-CONSTRAINTS].

In this context, PROV-N is introduced as a notation to write instances of the PROV data model primarily aimed at human consumption. PROV-N allows serializations of PROV-DM instances to be written in a technology independent manner. So far, PROV-N has been used in the following ways:

PROV-N was designed to be as close as possible to PROV-DM without the syntactic bias and modelling constraints that concrete technologies bring with them, e.g., XML's choice between attribute and element, RDF's reliance on triples, or JSON's usage of dictionaries.

The purpose of this document is solely to define the syntax of PROV-N. For each construct of PROV-DM, a corresponding PROV-N expression is introduced, by way of a production in the PROV-N grammar presented in this document.

1.1 Structure of this Document

Section 2 provides the design rationale for the PROV Notation.

Section 3 defines the notation for the Extended Backus-Naur Form (EBNF) grammar used in this specification.

Section 4 presents the grammar of all expressions of the language, presented one by one, and grouped according to PROV-DM components.

Section 5 defines the grammar of containers, a house-keeping construct of PROV-N capable of packaging up PROV-N expressions and namespace declarations.

Section 6 defines the grammar of accounts.

Section 7 defines media type for the PROV-N notation.

1.2 PROV-DM Namespace

The PROV namespace is http://www.w3.org/ns/prov#.

All the elements, relations, reserved names and attributes introduced in this specification belong to the PROV namespace.

1.3 Conventions

The key words "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].

2. Design Rationale for PROV-N

A key goal of PROV-DM is the specification of a machine-processable data model for provenance so that application having obtained the provenance of the resource they manipulate can reason about such provenance. As such, representations of PROV-DM are available in RDF and XML.

However, communicating provenance between humans is also important when teaching, illustrating, formalizing, and discussing provenance-related issues. To this end, PROV-N is a notation that is designed to write instances of the PROV-DM data model in a compact textual form, without the syntactic baggage and constraints coming with a markup language such as XML or a description framework such as RDF.

3. Grammar Notation

This specification includes a grammar for PROV-N expressed using the Extended Backus-Naur Form (EBNF) notation.

Each production rule (or production, for short) in the grammar defines one non-terminal symbol, in the form:

E ::= expression

Within the expression on the right-hand side of a rule, the following expressions are used to match strings of one or more characters:

4. PROV-N Productions per Component

A PROV-N document consists of a sequence of expressions, wrapped up in an expression container with some namespace declarations. This section focuses on the definition of expressions.

Instances of the PROV-DM data model are expressed as PROV-N expressions, which have a text conformant with the toplevel production expression of the grammar.

expression






 ::=






entityExpression | activityExpression | generationExpression | usageExpression
  | startExpression | endExpression | communicationExpression | startByActivityExpression
  | agentExpression | attributionExpression | associationExpression | responsibilityExpression
  | derivationExpression | revisionExpression | quotationExpression
  | hadOriginalSourceExpression | traceabilityExpression
  | alternateExpression | specializationExpression
  | noteExpression | annotationExpression

In the rest of the section, productions are presented for each expression, followed by small examples illustrating the syntax of expressions compliant with the presented productions.

4.1 Component 1: Entities and Activities

4.1.1 Entity

An entity's text matches the entityExpression production.

entityExpression ::= entity ( identifier optional-attribute-values )

optional-attribute-values ::= , [ attribute-values ]
attribute-values ::= attribute-value | attribute-value , attribute-values
attribute-value ::= attribute = Literal
entity(tr:WD-prov-dm-20111215)
entity(tr:WD-prov-dm-20111215, [ prov:type="document" ])
entity(tr:WD-prov-dm-20111215, [ prov:type="document", ex:version=2 ])

4.1.2 Activity

An activity's text matches the activityExpression production.

activityExpression ::= activity ( identifier , (time | - ) , (time | - ) optional-attribute-values )
activity(ex:a10)
activity(ex:a10, -, -)
activity(ex:a10, -, -, [prov:type="edit"])
activity(ex:a10, -, 2011-11-16T16:00:00)
activity(ex:a10, 2011-11-16T16:00:00, -)
activity(ex:a10, 2011-11-16T16:00:00, -, [prov:type="createFile"])
activity(ex:a10, 2011-11-16T16:00:00, 2011-11-16T16:00:01, [prov:type="createFile"])
activity(ex:a10, [prov:type="edit"])

4.1.3 Generation

A generation's text matches the generationExpression production.

generationExpression ::= wasGeneratedBy ( ( identifier | - ) , eIdentifier , ( aIdentifier | - ) , ( time | - ) optional-attribute-values )
wasGeneratedBy(tr:WD-prov-dm-20111215, ex:edit1, -)
wasGeneratedBy(tr:WD-prov-dm-20111215, ex:edit1, 2011-11-16T16:00:00)
wasGeneratedBy(e2, a1, -, [ex:fct="save"])     
wasGeneratedBy(e2, -, -, [ex:fct="save"])     
wasGeneratedBy(ex:g1, tr:WD-prov-dm-20111215, ex:edit1, -)
wasGeneratedBy(ex:g1, tr:WD-prov-dm-20111215, ex:edit1, 2011-11-16T16:00:00)
wasGeneratedBy(-, tr:WD-prov-dm-20111215, ex:edit1, -)

Even though the production generationExpression allows for expressions wasGeneratedBy(e2, -, -) and wasGeneratedBy(-, e2, -, -), these expressions are not valid in PROV-N, since at least one of activity, time, or attributes must be present.

4.1.4 Usage

A usage's text matches the usageExpression production.

usageExpression ::= used ( ( identifier | - ) , aIdentifier , eIdentifier , ( time | - ) optional-attribute-values )
used(ex:act2, ar3:0111, -)
used(ex:act2, ar3:0111, 2011-11-16T16:00:00)
used(a1,e1, -, [ex:fct="load"])
used(ex:u1, ex:act2, ar3:0111, -)
used(-, ex:act2, ar3:0111, -)

4.1.5 Start

An activity start's text matches the startExpression production of the grammar

startExpression ::= wasStartedBy ( ( identifier | - ) , aIdentifier , ( eIdentifier | - ) , ( time | - ) optional-attribute-values )
wasStartedBy(ex:act2, ar3:0111, -)
wasStartedBy(ex:act2, ar3:0111, 2011-11-16T16:00:00)
wasStartedBy(ex:act2, -, 2011-11-16T16:00:00)
wasStartedBy(ex:act2, -, -)
wasStartedBy(ex:act2, -, -, [ex:param="a"])
wasStartedBy(s, ex:act2, ar3:0111, 2011-11-16T16:00:00)
wasStartedBy(-, ex:act2, ar3:0111, 2011-11-16T16:00:00)

Even though the production startExpression allows for expressions wasStartedBy(e2, -, -) and wasStartedBy(-, e2, -, -), these expressions are not valid in PROV-N, since at least one of trigger, time, or attributes must be present.

4.1.6 End

An activity end's text matches the endExpression production of the grammar.

endExpression ::= wasEndedBy ( ( identifier | - ) , aIdentifier , ( eIdentifier | - ) , ( time | - ) optional-attribute-values )
wasEndedBy(ex:act2, ex:trigger, -)
wasEndedBy(ex:act2, ex:trigger, 2011-11-16T16:00:00)
wasEndedBy(ex:act2, -, 2011-11-16T16:00:00)
wasEndedBy(ex:act2, -, 2011-11-16T16:00:00, [ex:param="a"])
wasEndedBy(e,ex:act2, -, -)
wasEndedBy(e, ex:act2, ex:trigger, 2011-11-16T16:00:00)
wasEndedBy(-, ex:act2, ex:trigger, 2011-11-16T16:00:00)

Even though the production endExpression allows for expressions wasEndedBy(e2, -, -) and wasEndedBy(-, e2, -, -), these expressions are not valid in PROV-N, since at least one of trigger, time, and attributes must be present.

4.1.7 Communication

communicationExpression  ::= wasInformedBy ( ( identifier | - ) , aIdentifier , aIdentifier optional-attribute-values )
wasInformedBy(ex:a1, ex:a2)
wasInformedBy(ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])
wasInformedBy(i, ex:a1, ex:a2)
wasInformedBy(i, ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])
wasInformedBy(-, ex:a1, ex:a2)
wasInformedBy(-, ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])

4.1.8 Start by Activity

startByActivityExpression  ::= wasStartedByActivity ( ( identifier | - ) , aIdentifier , aIdentifier optional-attribute-values )
wasStartedByActivity(ex:a1, ex:a2)
wasStartedByActivity(ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])
wasStartedByActivity(s,ex:a1, ex:a2)
wasStartedByActivity(s,ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])
wasStartedByActivity(-,ex:a1, ex:a2)
wasStartedByActivity(-,ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])

4.2 Component 2: Agents and Responsibility

4.2.1 Agent

An agent's text matches the agentExpression production.

agentExpression ::= agent ( identifier optional-attribute-values )
agent(ag4)
agent(ag4, [ prov:type="prov:Person" %% xsd:QName, ex:name="David" ])

4.2.2 Attribution

attributionExpression ::= wasAttributedTo ( ( identifier | - ) , eIdentifier , agIdentifier optional-attribute-values )
wasAttributedTo(e, ag)
wasAttributedTo(e, ag, [ex:license="cc:attributionURL" %% "xsd:QName"])
wasAttributedTo(id, e, ag, [ex:license="cc:attributionURL" %% "xsd:QName"])
wasAttributedTo(-,  e, ag, [ex:license="cc:attributionURL" %% "xsd:QName"])

4.2.3 Association

An association's text matches the activityAssociationExpression productions of the grammar defined in this specification document.

associationExpression ::= wasAssociatedWith ( ( identifier | - ) , aIdentifier , ( agIdentifier | - ) , ( eIdentifier | - ) optional-attribute-values )
wasAssociatedWith(ex:a1, -, ex:e1)
wasAssociatedWith(ex:a1, ex:ag1, -)
wasAssociatedWith(ex:a1, ex:ag1, ex:e1)
wasAssociatedWith(ex:a1, ex:ag1, ex:e1, [ex:param1="a", ex:param2="b"])
wasAssociatedWith(a, ex:a1, -, ex:e1)
wasAssociatedWith(-, ex:a1, -, ex:e1)
wasAssociatedWith(-, ex:a1, ex:ag1, -)

Even though the production associationExpression allows for expressions wasAssociatedWith(a, -, -) and wasAssociatiedWith(-, a, -, -), these expressions are not valid in PROV-N, since at least one of agent or plan must be present.

4.2.4 Responsibility

responsibilityExpression ::= actedOnBehalfOf ( ( identifier | - ) , agIdentifier , agIdentifier , ( aIdentifier | - ) optional-attribute-values )
actedOnBehalfOf(ag1, ag2, -)
actedOnBehalfOf(ag1, ag2, a)
actedOnBehalfOf(ag1, ag2, -, [prov:type="delegation"])
actedOnBehalfOf(ag2, ag3, a, [prov:type="contract"])
actedOnBehalfOf(r, ag2, ag3, a, [prov:type="contract"])
actedOnBehalfOf(-, ag1, ag2, -)

4.3 Component 3: Derivations

4.3.1 Derivation

A derivation expression's text matches the derivationExpression production.

derivationExpression ::= wasDerivedFrom ( ( identifier | - ) , eIdentifier , eIdentifier , ( aIdentifier | - ) , ( gIdentifier | - ) , ( uIdentifier | - ) optional-attribute-values )
wasDerivedFrom(e2, e1)
wasDerivedFrom(e2, e1, a, g2, u1)
wasDerivedFrom(e2, e1, -, g2, u1)
wasDerivedFrom(e2, e1, a, -, u1)
wasDerivedFrom(e2, e1, a, g2, -)
wasDerivedFrom(e2, e1, a, -, -)
wasDerivedFrom(e2, e1, -, -, u1)
wasDerivedFrom(e2, e1, -, -, -)
wasDerivedFrom(d, e2, e1, a, g2, u1)
wasDerivedFrom(-, e2, e1, a, g2, u1)

4.3.2 Revision

revisionExpression ::= wasRevisionOf ( ( identifier | - ) , eIdentifier , eIdentifier , ( agIdentifier | - ) optional-attribute-values )
wasRevisionOf(tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, -)
wasRevisionOf(tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, w3:Consortium)
wasRevisionOf(id,tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, w3:Consortium)
wasRevisionOf(tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, -)
wasRevisionOf(id,tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, -)
wasRevisionOf(-,tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, -)

4.3.3 Quotation

A quotation expression's text matches the quotationExpression production of the grammar.

quotationExpression ::= wasQuotedFrom ( ( identifier | - ) , eIdentifier , eIdentifier , ( agIdentifier | - ) , ( agIdentifier | - ) optional-attribute-values )
wasQuotedFrom(ex:blockQuote,ex:blog)
wasQuotedFrom(ex:blockQuote,ex:blog,ex:Luc,ex:Paul)
wasQuotedFrom(ex:blockQuote,ex:blog,-,ex:Paul)
wasQuotedFrom(ex:blockQuote,ex:blog,ex:Luc,ex:Paul,[])
wasQuotedFrom(ex:blockQuote,ex:blog, -, -)
wasQuotedFrom(id,ex:blockQuote,ex:blog,ex:Luc,ex:Paul)
wasQuotedFrom(-,ex:blockQuote,ex:blog,ex:Luc,-)

4.3.4 Original Source

An original source record's text matches the originalSourceExpression production of the grammar.

originalSourceExpression ::= hadOriginalSource ( ( identifier | - ) , eIdentifier , eIdentifier optional-attribute-values )
hadOriginalSource(ex:e1, ex:e2)
hadOriginalSource(ex:e1, ex:e2,[ex:param="a"])
hadOriginalSource(-,ex:e1, ex:e2,[ex:param="a"])
hadOriginalSource(-,ex:e1, ex:e2)

4.3.5 Traceability

A traceability expression's text matches the traceabilityExpression production of the grammar.

traceabilityExpression ::= tracedTo ( ( identifier | - ) , eIdentifier , eIdentifier optional-attribute-values )
tracedTo(e2,e1)
tracedTo(e2,e1,[ex:param="a"])
tracedTo(id,e2,e1,[ex:param="a"])
tracedTo(-,e2,e1)

4.4 Component 4: Alternate Entities

4.4.1 Alternate

An alternate relation's text matches the alternateExpression production.

alternateExpression ::= alternateOf ( eIdentifier , eIdentifier )
alternateOf(tr:WD-prov-dm-20111215,ex:alternate-20111215)

4.4.2 Specialization

A specialization relation's text matches the specializationExpression production.

specializationExpression ::= specializationOf ( eIdentifier , eIdentifier )
specializationOf(tr:WD-prov-dm-20111215,tr:prov-dm)

4.5 Component 5: Collections

Grammar for collections may under go minor syntactic changes since it has not been implemented yet.
In the productions in this section, nonterminals keyValuePairs and keySet are defined as follows.
keyValuePairs  ::= ( literal , eidentifier ) | ( literal , eidentifier ) , keyValuePairs
keySet  ::= literal | literal , keySet

4.5.1 Insertion

A Derivation-by-Insertion relation's text matches the derivationByInsertionFromExpression production.

derivationByInsertionFromExpression ::= derivedByInsertionFrom ( identifier , cIdentifier , cIdentifier , { keyValuePairs } optional-attribute-values )
 derivedByInsertionFrom(c1, c, {("k1", v1), ("k2", v2)})  
 derivedByInsertionFrom(c1, c, {("k1", v1)})  
 derivedByInsertionFrom(c1, c, {("k1", v1), ("k2", v2)}, [])

4.5.2 Removal

A Derivation-by-Removal relation's text matches the derivationByRemovalFromExpression production.

derivationByRemovalFromExpression ::= derivedByRemovalFrom ( identifier , cIdentifier , cIdentifier , { keySet } optional-attribute-values )
   derivedByRemovalFrom(c3, c1, {"k1", "k3"})               
   derivedByRemovalFrom(c3, c1, {"k1"})               
   derivedByRemovalFrom(c3, c1, {"k1", "k3"}, [])               

4.5.3 Membership

A Membership relation's text matches the membershipExpression production.

membershipExpression ::= isMemberOf ( identifier , cIdentifier , { keyValuePairs } optional-attribute-values )
   memberOf(c3, {("k4", v4), ("k5", v5)})
   memberOf(c3, {("k4", v4)})
   memberOf(c3, {("k4", v4), ("k5", v5)},[])  

4.6 Component 6: Annotations

4.6.1 Note

A note's text matches the noteExpression production.

noteExpression ::= note ( identifier optional-attribute-values )
note(ann1,[ex:color="blue", ex:screenX=20, ex:screenY=30])

4.6.2 Annotation

A note's text matches the noteExpression production.

annotationExpression ::= hasAnnotation ( identifier , nIdentifier )
hasAnnotation(tr:WD-prov-dm-20111215,ex2:n1)

4.7 Further Expressions

This section defines further expressions of PROV-N.

4.7.1 Namespace Declaration

namespaceDeclarations ::= | defaultNamespaceDeclaration | namespaceDeclaration namespaceDeclaration
namespaceDeclaration ::= prefix prefix IRI
defaultNamespaceDeclaration ::= default IRI

In PROV-N, the following prefixes are reserved:

  • prov denotes the PROV namespace http://www.w3.org/ns/prov#
  • xsd denotes the XML Schema namespace http://www.w3.org/2001/XMLSchema.

A PROV-N document must not redeclare prefixes prov and xsd.

The following example declares three namespaces, one default, and two with explicit prefixes ex1 and ex2.

container
  default <http://example.org/0/>
  prefix ex1 <http://example.org/1/>
  prefix ex2 <http://example.org/2/>
...
end

4.7.2 Identifier

A qualified name is a name subject to namespace interpretation. It consists of a namespace, denoted by an optional prefix, and a local name. PROV-DM stipulates that a qualified name can be mapped into an IRI by concatenating the IRI associated with the prefix and the local part.

A qualified name's prefix is optional. If a prefix occurs in a qualified name, it refers to a namespace declared in a namespace declaration. In the absence of prefix, the qualified name refers to the default namespace.

identifier ::= qualifiedName
eIdentifier ::= identifier (intended to denote an entity)
aIdentifier ::= identifier (intended to denote an activity)
agIdentifier ::= identifier (intended to denote an agent)
gIdentifier::= identifier (intended to denote a generation)
uIdentifier::= identifier (intended to denote a usage)
nIdentifier::= identifier (intended to denote a note)
cIdentifier::= identifier (intended to denote a collection)


qualifiedName  ::= prefix : localPart | : localPart
prefix  ::= a name without colon compatible with the NC_NAME production [XML-NAMES]
localPart  ::= a name compatible with the reference production [RDFA-CORE]

A PROV qualified name has a more permissive syntax then XML's QName [XML-NAMES] since it allows any syntax for its local part provided that the concatenation with the namespace results in a valid IRI [IRI].

Examples of articles on the BBC Web site seen as entities.

container
  prefix bbc <http://www.bbc.co.uk/>
  prefix bbcNews <http://www.bbc.co.uk/news/>

  entity(bbc:)                          // bbc site itself
  entity(bbc:news/)                     // bbc news
  entity(bbc:news/world-asia-17507976)  // a given news article

  entity(bbcNews:)                      // an alternative way of referring to the bbc news site

end

Examples of entities with declared and default namespace.

container
  default <http://example.org/2/>
  prefix ex <http://example.org/1/>

  entity(ex:a)     //  corresponds to IRI http://example.org/1/a
  entity(ex:a/)    //  corresponds to IRI http://example.org/1/a/
  entity(ex:a/b)   //  corresponds to IRI http://example.org/1/a/b
  entity(b)        //  corresponds to IRI http://example.org/2/b
  entity(ex:1234)  //  corresponds to IRI http://example.org/2/1234
  entity(4567)     //  corresponds to IRI http://example.org/2/4567
end

Note:The productions for qualifiedName and prefix are conflicting. In the context of a namespaceDeclaration, a parser should give precedence to the production for prefix.

We need to explicitly disallow '-' as first and only character of local part. Instead, it should be encoded as pct-encoded [RFC3987].

4.7.3 Attribute

An attribute's text matches the attribute production.

attribute ::= qualifiedName

The reserved attributes in the PROV namespace are the following.

  1. prov:label
  2. prov:location
  3. prov:role
  4. prov:type

4.7.4 Literal

A Literal's text matches the Literal production.

Literal  ::= typedLiteral | convenienceNotation
typedLiteral ::= quotedString %% datatype
datatype ::= qualifiedName listed in Table permitted-datatypes
convenienceNotation  ::= stringLiteral | intLiteral
stringLiteral ::= quotedString
quotedString ::= a finite sequence of characters in which " (#x22) and \ (#x5C) occur only in pairs of the form \" (#x5C, #x22) and \\ (#x5C, #x5C), enclosed in a pair of " (#x22) characters
intLiteral ::= a finite-length non-empty sequence of decimal digits (#x30-#x39) with an optional leading negative sign (-)

The non terminals stringLiteral and intLiteral are syntactic sugar for quoted strings with datatype xsd:string and xsd:int, respectively.

In particular, a Literal may be an IRI-typed string (with datatype xsd:anyURI); such IRI has no specific interpretation in the context of PROV.

Permitted datatypes in literals
xsd:decimal xsd:double xsd:dateTime
xsd:integer xsd:float
xsd:nonNegativeInteger xsd:string rdf:XMLLiteral
xsd:nonPositiveIntegerxsd:normalizedString
xsd:positiveInteger xsd:token
xsd:negativeInteger xsd:language
xsd:long xsd:Name
xsd:int xsd:NCName
xsd:short xsd:NMTOKEN
xsd:byte xsd:boolean
xsd:unsignedLong xsd:hexBinary
xsd:unsignedInt xsd:base64Binary
xsd:unsignedShortxsd:anyURI
xsd:unsignedByte xsd:QName

Note:The productions for qualifiedName and intLiteral are conflicting. In the context of a Literal, a parser should give precedence to the production for intLiteral.

Wouldn't it be useful to introduce a literal for a qualified name? Currenlty, we have to write:
prov:type="ex:Programmer"  %% xsd:QName
to indicate that ex:Programmer should be interpreted as qualified name (QName). Instead, we could have a notation such as
prov:type='ex:Programmer'
4.7.4.1 Reserved Type Values

The reserved type values in the PROV namespace are the following.

  1. prov:AccountEntity
  2. prov:SoftwareAgent
  3. prov:Person
  4. prov:Organization
  5. prov:Plan
  6. prov:Collection
  7. prov:EmptyCollection

The entity ag is a person (type: prov:Person), whereas the entity pl is a plan (type: prov:Plan).

agent(ag,[prov:type="prov:Person" %% xsd:QName])
entity(pl,[prov:type="prov:Plan" %% xsd:QName])
4.7.4.2 Time Values

Time instants are defined according to xsd:dateTime [XMLSCHEMA-2].

The third argument in the following usage expression is a time instance, namely 4pm on 2011-11-16.

used(ex:act2, ar3:0111, 2011-11-16T16:00:00)

5. Expression Container

An expression container is a house-keeping construct of PROV-N capable of packaging up PROV-N expressions and namespace declarations. An expression container forms a self-contained package of provenance descriptions for the purpose of exchanging them. An expression container may be used to package up PROV-N expressions in response to a request for the provenance of something ([PROV-AQ]).

Given its status of house keeping construct for the purpose of exchanging provenance expressions, an expression container is not defined as a PROV-N expression (production expression).

An expression container, written container decls exprs endContainer in PROV-N, contains:

An expression container's text matches the expressionContainer production.

expressionContainer ::= container namespaceDeclarations expression endContainer

The following container contains expressions related to the provenance of entity e2.

container
  prefix ex <http://example.org/>

  entity(e2, [ prov:type="File", ex:path="/shared/crime.txt", ex:creator="Alice", 
               ex:content="There was a lot of crime in London last month."])
  activity(a1, 2011-11-16T16:05:00, -,[prov:type="edit"])
  wasGeneratedBy(e2, a1, -, [ex:fct="save"])     
  wasAssociatedWith(a1, ag2, -, [prov:role="author"])
  agent(ag2, [ prov:type="prov:Person" %% xsd:QName, ex:name="Bob" ])

endContainer

This container could for instance be returned as the result of a query to a provenance store for the provenance of entity e2 [PROV-AQ].

6. Account

PROV-DM has introduced a notion of account by which a set of provenance descriptions can be bundled up and named. PROV-DM assumes the existence of mechanisms to implement accounts, but such mechanisms remain outside its scope. It is suggested that specific serializations may offer solutions to name bundles of descriptions.

Given that the primary motivation for PROV-N is to provide a notation aimed at human consumption, it is therefore appropriate to introduce a notation for accounts, which would include an account name and a bundle of expressions.

An account, written account(id, exprs) in PROV-N, contains:

In PROV-N, an account's text matches the accountExpression production of the grammar.

accountExpression ::= account ( identifier , expression )

It is also useful to package up one or more account expressions in an expression container, for interchange purpose. Hence, expressionContainer is revised as follows.

expressionContainer ::= container namespaceDeclarations expression endContainer
| container namespaceDeclarations accountExpression endContainer

The following container

container
  prefix ex <http://example.org/>

  account(ex:acc1,...)
  account(ex:acc2,...)
endContainer

illustrates how two accounts with identifiers ex:acc1 and ex:acc2 can be returned in a PROV-N serialization of the provenance of something.

The following container

container
  prefix ex <http://example.org/>
  ...

  account(ex:acc1,
      entity(tr:WD-prov-dm-20111018, [ prov:type="pr:RecsWD" %% xsd:QName ])
      entity(tr:WD-prov-dm-20111215, [ prov:type="pr:RecsWD" %% xsd:QName ])
      ...
      wasAssociatedWith(ex:pub2, w3:Consortium, pr:rec-advance))

  account(ex:acc2,
      entity(ex:acc1, [prov:type="prov:AccountEntity" %% xsd:QName ])
      wasAttributedTo(ex1:acc1, w3:Consortium))

endContainer

illustrates a first account, with identifier ex:acc1, containing expressions describing the provenance of the technical report tr:WD-prov-dm-20111215, and a second account ex:acc2, describing the provenance of the first. In account ex:acc2, ex:acc1 is the identifier of an entity of type prov:AccountEntity.

7. Media Type

The media type of PROV-N is text/prov-n. The content encoding of PROV-N content is UTF-8.

See http://www.w3.org/2002/06/registering-mediatype for Register an Internet Media Type for a W3C Spec.

A. Acknowledgements

WG membership to be listed here.

B. References

B.1 Normative references

[IRI]
M. Duerst, M. Suignard. Internationalized Resource Identifiers (IRI). January 2005. Internet RFC 3987. URL: http://www.ietf.org/rfc/rfc3987.txt
[RDFA-CORE]
Shane McCarron; et al. RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes. 13 March 2012. W3C Candidate Recommendation. URL: http://www.w3.org/TR/2012/CR-rdfa-core-20120313/
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Internet RFC 2119. URL: http://www.ietf.org/rfc/rfc2119.txt
[RFC3987]
M. Dürst; M. Suignard. Internationalized Resource Identifiers (IRIs). January 2005. Internet RFC 3987. URL: http://www.ietf.org/rfc/rfc3987.txt
[XML-NAMES]
Richard Tobin; et al. Namespaces in XML 1.0 (Third Edition). 8 December 2009. W3C Recommendation. URL: http://www.w3.org/TR/2009/REC-xml-names-20091208/
[XMLSCHEMA-2]
Paul V. Biron; Ashok Malhotra. XML Schema Part 2: Datatypes Second Edition. 28 October 2004. W3C Recommendation. URL: http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/

B.2 Informative references

[PROV-AQ]
Graham Klyne and Paul Groth (eds.) Luc Moreau, Olaf Hartig, Yogesh Simmhan, James Meyers, Timothy Lebo, Khalid Belhajjame, and Simon Miles Provenance Access and Query. 2011, Working Draft. URL: http://www.w3.org/TR/prov-aq/
[PROV-DM]
Luc Moreau and Paolo Missier (eds.) ... PART 1: PROV-DM .... 2011, Working Draft. URL: http://www.w3.org/TR/prov-dm/
[PROV-DM-CONSTRAINTS]
Luc Moreau and Paolo Missier (eds.) ... PROV-DM Constraints. 2011, Working Draft. URL: http://www.w3.org/TR/prov-dm-constraints/
[PROV-RDF]
James CheneyPROV-RDF Mapping 2012, Working in Progress. URL: http://www.w3.org/2011/prov/wiki/ProvRDF
[PROV-SEM]
James Cheney Formal Semantics Strawman. 2011, Work in progress. URL: http://www.w3.org/2011/prov/wiki/FormalSemanticsStrawman
[PROV-XML]
James CheneyPROV-XML Mapping 2012, Working in Progress. URL: http://www.w3.org/2011/prov/wiki/ProvXML