- DRAFT -
See document
status below
Determining Complete GRDDL Results
Proposed
W3C Working Group Note 18-Jun-2007
- This Version:
- http://www.w3.org/TR/2007/NOTE-grddl-complete-@@date@@/
- Latest Version:
- http://www.w3.org/TR/grddl-complete/
- Previous Version:
- http://www.w3.org/TR/2006/WD-grddl-complete-@@date@@/
- Editors:
- David
Booth, HP
Copyright
© 2007 W3C® (MIT, ERCIM,
Keio), All Rights Reserved. W3C liability,
trademark
and document
use rules apply.
Abstract
This companion to the GRDDL
specification defines the notion of "complete GRDDL results" and
describes how they can be
computed by a GRDDL-aware agent if the agent chooses to do so.
Status of this Document
This section describes the status of this document at the time
of its publication. Other documents may supersede this document. @@Add
standard verbiage here@@
This
document
is not (currently) a product of the GRDDL working group or the W3C. It is a draft that was produced
independently by
the author(s) for consideration by
the GRDDL working group. If this document is adopted as a work
product of the GRDDL working group, then it will be moved from its
current location to the W3C web site.
This document builds on the
GRDDL
specification, which is hereby incorporated by reference, and makes
use of several terms defined therein. Readers should be familiar
with that document
before reading this one.
Normative assertions are
marked up in this way.
Introduction
GRDDL is used "to complement the concrete RDF/XML syntax with a
mechanism to relate other XML syntaxes . . . to the RDF abstract
syntax"[GRDDL
Charter].
The GRDDL specification defines the notion of GRDDL results and the
process that GRDDL-aware agents should use to compute GRDDL results
from an XML document. The process is intentionally
variable: for security and other reasons, the GRDDL-aware agent is not
required to compute all possible GRDDL results for that XML document.
In some cases, a GRDDL transformation author may wish to be very
precise about the exact set of RDF triples that the GRDDL
transformation is intended to denote when applied to a particular XML
document. Similarly, the user of that XML document may want to
know whether the GRDDL results that his/her GRDDL-aware agent produced
constitute all of those
triples. This can be important in applications where XML
documents are treated as custom serializations of RDF, and GRDDL is
used to "relate their syntax to RDF/XML"[GRDDL Charter]. Without
a commonly accepted definition of "complete GRDDL results", users may
unknowingly receive different subsets of the intended RDF triples from
different GRDDL-aware agent implementations -- each labeled "complete
GRDDL results". The purpose of this
document is therefore to provide a common definition of "complete GRDDL
results".
A GRDDL-aware agent is not required
to compute complete GRDDL results. However, a GRDDL-aware agent
choosing to implement this Note:
- SHOULD provide an option to specify whether complete GRDDL
results are
preferred (though this option should not take precedence over security
considerations); and, if so, the GRDDL-aware agent
- SHOULD attempt to determine them (subject to security
considerations) ; and
- SHOULD provide a means of indicating whether the actual GRDDL
results obtained
from a particular XML document (representation) are known to
constitute:
- the complete
GRDDL
result;
- a subgraph of the complete GRDDL result; or
- neither.
To facilitate the determination of complete GRDDL results, this Note
defines an optional attribute in the GRDDL namespace, grddl:complete,
and a metadata profile URI, http://www.w3.org/2003/g/complete/
. GRDDL-aware agents that do not implement this Note may ignore
this
attribute and profile URI, but SHOULD NOT generate an error if one is
encountered in an XML document.
Case
1: Directly specified transformations
The
simplest case is when the XML document author, as a shortcut, has
chosen to explicitly indicate that complete GRDDL results can be
obtained by applying only the
transformations that are indicated directly in that XML document,
without
dereferencing namespace or profile URIs. This can be indicated in
the XML document in either of two ways with the same effect:
- by specifying the attribute grddl:complete='true' on
the root element of the XML document; or
- by specifying http://www.w3.org/2003/g/complete/ as a
metadata profile, as described in the GRDDL specification([GRDDL SPEC],
section 4).
If the root element has a grddl:complete attribute with a
non-empty value that is anything other than true or false,
the GRDDL-aware agent SHOULD report this as a non-fatal error. It
is not an error if the
document root element specifies grddl:complete='false' but
the http://www.w3.org/2003/g/complete/ metadata profile is
specified. The meaning is the same as if the grddl:complete
attribute had not been specified.
This short cut technique is important because, if it were not
available, complete GRDDL results
could only be assured if all namespace and profile IRIs were
dereferenceable and recursively produced complete GRDDL
results. That
would be problematic because:
- It would force users to choose between security and obtaining
complete GRDDL results. A user may trust the transformations that
are specified directly in the XML document, but may not trust,
recursively, all transformations that are specified by all namespace or
profile IRIs. (You may be willing to trust your immediate friend,
but not the friend-of-a-friend-of-a-friend-of-a-friend, etc.)
- It creates a lot of dependencies. If any namespace or profile IRI
in the recursive dependency chain fails to produce complete GRDDL
results, then complete GRDDL results cannot be determined for the
original XML document. This could happen, for example, if any
such IRI cannot be dereferenced.
Here is the normative condition for deciding whether this case applies.
Given an information resource having a representation D that is an XML document having an
XPath node N with root element E, if
and only if the following condition holds:
the expression
/*/@*[local-name()="complete"
and namespace-uri()=
"http://www.w3.org/2003/g/data-view#"]
matches an attribute of E and the value of that attribute
is the literal true,
or http://www.w3.org/2003/g/complete/
is a metadata profile name of N (as described in the GRDDL
specification, section 4),
then
D directly specifies GRDDL transformations.
And here is the normative rule for determining complete GRDDL results
in this case.
Given an information resource having a representation D that is an XML document having an
XPath node N with root element E, if
D directly specifies GRDDL transformations,
then if the following steps are performed:
- For all of the following transformations associated with N:
- each transformation associated with N via the grddl:transformation
attribute, as described in the GRDDL specification Adding GRDDL to well-formed XML
section; and
- each transformation associated with N via HTML
links of type transformation, provided the document bears the
http://www.w3.org/2003/g/data-view profile, as
described in the GRDDL specification Using
GRDDL with valid XHTML section.
- Apply all such transformations to obtain GRDDL results.
- Merge those GRDDL results.
then the resulting RDF graph is the
complete
GRDDL result of
D.
Case
2: Namespace and profile transformations
If
the XML document has specified neither the grddl:complete='true'
attribute on the root element, nor the http://www.w3.org/2003/g/complete/
metadata profile IRI, then all namespace and metadata profile IRIs must
recursively produce complete GRDDL results in order to to determine the
complete GRDDL result of the original XML document.
Here is the normative rule for this case.
Given an information resource
having a representation
D
that is an XML document having an XPath node
N with root
element
E, if
D
does
not directly specify GRDDL transformations,
then if the following steps are performed:
@@unfinished@@
- For all of the following transformations associated with N:
- each transformation associated with N via the grddl:transformation
attribute, as described in the GRDDL specification Adding GRDDL to well-formed XML
section; and
- each transformation associated with N via HTML
links of type transformation, provided the document bears the
http://www.w3.org/2003/g/data-view profile, as
described in the GRDDL specification Using
GRDDL with valid XHTML section;
- each transformation indicated by any available namespace
document, as in the GRDDL for XML
Namespaces section; and @@fix this clause to specify that
each namespace IRI produces comlete GRDDL results@@
- each transformation indicated by any XHTML profiles, as in
the GRDDL for HTML Profiles
section. @@fix this clause to specify that each profile IRI
produces comlete GRDDL results@@
- Apply all such transformations to obtain GRDDL results.
- Merge those GRDDL results.
then the resulting RDF graph is the
complete
GRDDL result of
D.
@@unfinished@@
if NU is an IRI that identifies an information resource having a
representation ND, and NG is the complete GRDDL result of ND
@@Add mention of the recursive loop case, perhaps defining the
result in terms of the least fixed point.@@
Appendix A: About the GRDDL complete
metadata profile
The special metadata profile URI http://www.w3.org/2003/g/complete/
@@unfinished. not sure if this section is needed.@@
Glossary
- GRDDL-aware agent
- a GRDDL-aware agent isa software agent able to identify the GRDDL transformations
specified in a source document
and run them to extract RDF.
- Source Document
- an XML document which references at least one GRDDL transformation for a
GRDDL-aware agent to use
to extract RDF from it.
- GRDDL Transformation
- a GRDDL transformation is an algorithm which, when applied to a
compliant source document,
allows a GRDDL-aware agent
to extract RDF from this document.
- Microformats
- a set of simple, open data formats built upon existing and widely
adopted standards.
- RDFa
- a syntax for expressing RDF metadata in XHTML.
- Result Document
- a document obtained by applying a GRDDL transformation to a
source document.
- SPARQL
- the SPARQL Protocol And RDF Query Language for accessing RDF
stores.
Acknowledgements
The editor greatfully acknowledges the contributions of the
following Working Group members:
References
- [GRDDL Spec]
- Gleaning
Resource Descriptions from Dialects of Languages (GRDDL),
Dan Connolly, W3C Working Draft 24 October 2006, Latest version available at
http://www.w3.org/TR/grddl/. @@Update link and date@@
- [GRDDL Primer Draft]
- GRDDL Primer,
Ian Davis, W3C Working Draft 2 October 2006, Latest version available
at http://www.w3.org/TR/grddl-primer/.
- [Microformats]
- Microformat,
2006/08/30 11:05:31, http://microformats.org/ .
- [OWL Overview]
- OWL
Web Ontology Language Overview, Deborah L. McGuinness and Frank
van Harmelen, Editors, W3C Recommendation, 10 February 2004,
http://www.w3.org/TR/2004/REC-owl-features-20040210/. Latest version available
at http://www.w3.org/TR/owl-features/.
- [RDF04]
- RDF
Primer , Frank Manola, Eric Miller, Editors, W3C
Recommendation, 10 February 2004,
http://www.w3.org/TR/2004/REC-rdf-primer-20040210/. Latest version available
at http://www.w3.org/TR/rdf-primer/ .
- [RDFC04]
- Resource
Description Framework (RDF): Concepts and Abstract Syntax ,
G. Klyne, J. J. Carroll, Editors, W3C Recommendation, 10 February 2004,
http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ . Latest version available
at http://www.w3.org/TR/rdf-concepts/ .
- [RDFa]
- RDFa
Primer 1.0 16 May 2006, Ben Adida, Mark Birbeck. Latest version
available at http://www.w3.org/TR/xhtml-rdfa-primer/
This document is @@not@@
a product of the GRDDL
Working Group.