This page illustrates the use of GRDDL and schema annotation to capture the semantics of information in a multi-namespace document.
We show a sample record using the vocabulary of the Open Archives Initiative (taken directly from the OAI documentation), both in its original form and in a form augmented to include Creative Commons rights information. We also show how to augment the schema documents as necessary to allow the augmented record to be validated.
OAI sample record 1 - ( validate instance data against XML Schema)
Schema documents for
the main OAI vocabulary http://www.openarchives.org/OAI/2.0/
the OAI wrapper for Dublic Core data, http://www.openarchives.org/OAI/2.0/oai_dc/
the OAI wrapper for rights information, http://www.openarchives.org/OAI/2.0/rights/
the OAI vocabulary for metadata provenance information, http://www.openarchives.org/OAI/2.0/provenance
the Dublin Core vocabulary, http://purl.org/dc/elements/1.1/
a subset of RDF (N.B. unofficial schema, drafted by EM and MSM), http://www.w3.org/1999/02/22-rdf-syntax-ns#
the Creative Commons rights vocabulary (N.B. unofficial schema, drafted by EM and MSM), http://web.resource.org/cc/
OAI modified sample record 1 - (validate instance data against XML Schema with annotation, grddl instance data)
When we ask the schema validator to provide access to the entire post-schema-validation infoset (PSVI) and format it for display in HTML, we can see that the results depend in part on what schema the validator has available.
If we invoke the validator with instructions to find schema documents by checking the namespace URI and following schema-location hints in the XML document and in schema documents, then it can validate all of the OAI and Dublin Core elements. An HTML display shows those elements as green (valid) on white background (if they are fully validated) or light-blue background (if they are partially validated).
Note that there are no schema documents available at the namespace URIs for the RDF and Creative Commons namespaces. And the relevant schema documents are not pointed to by the instance document. So the validator cannot find any declarations for the elements and attributes in those namespaces. So the rdf:RDF element is not validated at all, as the display illustrates: it's shown as amber (validity unknown) on gray (not validated at all).
If we instruct the validator first to load the schema document for the RDF namespace linked above, and then to continue as before, the PSVI display shows that the rdf:RDF element is valid (green), but only partially validated (light blue background), because the validator cannot find any schema document for the Creative Commons vocabulary at the namespace URI.
If we tell the validator to load the Creative Commons and RDF schema documents (from the local schema documents we have drafted), and then proceed as before, it will find schema components for all the elements and attributes in the document. The PSVI display shows the entire document valid (green) and fully validated (white background).