Академический Документы
Профессиональный Документы
Культура Документы
Table of Contents
1 Overview......................................................................................................................................3 2 RDF/XML: a Brief Overview..........................................................................................................5 3 Storing Extensible Metadata........................................................................................................6 3.1 Content Files.........................................................................................................................6 3.2 RDF/XML Metadata Files .....................................................................................................6 3.3 The Metadata Manifest..........................................................................................................7 4 Describing Document Content.....................................................................................................8 4.1 Metadata describing the OpenDocument Document............................................................8 4.2 Metadata describing an OpenDocument Element.................................................................9 4.3 Metadata describing a Part of the Document......................................................................10 5 Metadata Scenarios...................................................................................................................13 5.1 Content described by Metadata...........................................................................................13 5.2 Content equivalent to Metadata..........................................................................................16 6 Metadata Proposal's FAQ ..........................................................................................................18 AppendixA. References.................................................................................................................19
1 Overview
Metadata lies at the heart of making documents more useful for their authors and subsequent users. This document provides an overview of the new metadata features in OpenDocument (1.2), which enable users and organizations to enhance their documents with the metadata of their choice. The Metadata SC of the OpenDocument TC at OASIS developed nineteen use cases that shaped the current metadata proposal.1 Those use cases were:
Accessibility Information Asymmetric Metadata Automatically Generated Metadata Bibliographies and Citations Content Tagging Conversion Metadata Document as Web Service Enhanced Search Extrinsic Metadata Intellectual Property Metadata Templates Ontology Validation Realtime Collaborative Editing Revision Metadata Rich Semantic Metadata Security Metadata Semantic Web Ready Documents Workflow Management
The use cases read like a wish list of metadata capabilities and the question facing the SC was how to make that possible. The resolution of that question requires extensible metadata as no committee proposal could anticipate all the contours of any one use case, much less all of them. Rather than re-inventing the metadata wheel, the metadata proposal adopted the W3C Resource Description Framework (RDF). RDF provides a flexible and extensible data standard that allows users and organizations to describe their documents in ways that fit their own needs. The contribution of the SC was to develop mechanisms in OpenDocument that enable the robust linking of RDF/XML metadata to OpenDocument content.
1 OpenDocument_Metadata_UseCases8Oct2006
09-10-22-ODF-MetaData-Examples.odt Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 3 of 19 October 22, 2009
A complete explanation of RDF is beyond the scope of this document but a short overview is provided to orient the reader to the mechanisms added to support the use of RDF in OpenDocument documents.2 The overview of RDF is followed by Storing Extensible Metadata, Describing Document Content and we conclude with Metadata Scenarios to provide a glimpse of the future that is made practical by the new metadata mechanisms. The scenario examples do not represent limitations of the metadata mechanisms but are evidence of the limited imaginations of the authors. This document is maintained by the OpenDocument Metadata SC so please contribute examples for inclusion at the SC's webpage at: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=officemetadata. A more detailed reference document with longer examples and accompanied by example files is in preparation by the Metadata SC. The current version of that document is available at the SC website.
2The examples in this document expose the underlying ODF and RDF mechanisms in a way that would not be seen by the average author/user of a document. That is to say that implementations will hide many of the details of how the metadata mechanisms work while providing users with the benefits of using RDF based metadata.
09-10-22-ODF-MetaData-Examples.odt Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 4 of 19 October 22, 2009
<(some IRI)/#Patrick> <(some IRI)/#has> <(some IRI)/#Bigfeet> . Note that we still have the same subject-verb-triple but it is expressed differently.
There are advantages to expressing the statement in RDF. First, we can gather up other information about Patrick that uses the same identifier. Second, in an OpenDocument format, we can enter that information only once for each subject and every time that subject appears, it has the same metadata. The subject and verb of an RDF statement are always written using an IRI (Internationalized Resource Identifier) [RFC3987]. The object can also be written using an IRI, but often in an OpenDocument document the object will be some text in the document. This enables the user to make statements about the content in an OpenDocument document. All of the RDF statements in the following examples use the simple model set forth above. (There are more complex mechanisms in RDF but they all follow that simple model.)5 The new metadata mechanisms bring the full power of RDF to OpenDocument documents. The only limitation is the users' skill in determining what metadata they want to use to enhance their documents.
3 RDF specifications, see http://www.w3.org/RDF 4 N3 notation tutorial, see http://www.w3.org/2000/10/swap/Primer.html 5 The examples are given in both RDF/XML and equivalent N3 syntax.
09-10-22-ODF-MetaData-Examples.odt Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 5 of 19 October 22, 2009
Content Files, see 3.1 RDF/XML Metadata, see 3.2 Metadata Manifest, see 3.3
Here is a fragment of an RDF/XML file (e.g. /meta/hospital/doctor.rdf) for Dr. James Franklin:
<odf:Element rdf:about="../../content.xml#ID_A"> <med:doctorOnDuty> <med:Doctor rdf:about="http://hospital-DB/doctors/ID116"> <med:fieldName xml:lang="en">Neurologist</med:fieldName> </med:Doctor> </med:doctorOnDuty> </odf:Element>
8 Different applications may even create annotations that contradict each other. As long as the applications do not look at each other's annotations, this will work.
09-10-22-ODF-MetaData-Examples.odt Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 7 of 19 October 22, 2009
Metadata can be used to describe the complete document Metadata can be used to describe a single OpenDocument element (e.g. a table) Metadata can be used to describe a set of OpenDocument elements (e.g. a part of the viewed content)
<?xml version="1.0"?> <rdf:RDF xmlns:pkg="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pkg:Document rdf:about=""> <rdf:type rdf:resource="http://hospital/documents/encouter-note"/> </pkg:Document> </rdf:RDF>
Content Example
The content.xml for the above document view consists of a text section, a heading and two paragraphs. The surrounding section is identified by an xml:id attribute:
<text:section xml:id="Sect1" text:style-name="Sect1" text:name="PhysicalExamData"> <text:h text:style-name="Heading_20_3" text:outline-level="3">PHYSICAL EXAMINATION</text:h> <text:p text:style-name="Standard"> VITALS: Temperature: 36.2, Pulse: 1.05Hz, Respiration: 0.2Hz </text:p> </text:section>
To attach metadata to this section, the xml:id value Sect1 will be referenced directly from the RDF/XML files using a relative in package URL, such as content.xml#Sect1.
10 Although the metadata is attached to the OpenDocument element, the metadata is usually about the content of the element.
09-10-22-ODF-MetaData-Examples.odt Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 9 of 19 October 22, 2009
Relative URLs are made absolute by using the URL of the document as base URI on loading. As a consequence, changing the location of the document (e.g., by moving it to some other place in the file system) will lead to different absolute URIs being generated for the contained content elements. This has the advantage that it is possible to tell apart the metadata for different versions of the same document. Because references within the document are stored as relative URIs, they are unaffected by changes in the storage location. But references from outside the document may break. If it is necessary to reference a content element independent of the document location, the RDF predicate owl:sameAs may be used to create a stable URI alias. But please note that creating URI aliases also has drawbacks (see [WEBARCH]).
Just as with <text:section> elements, metadata can be added to any of the more than forty OpenDocument elements that have an xml:id attribute.
<text:h text:outline-level="3">Notes from Monday</text:h> <text:p> The patient John Smith came in the morning and <text:meta xml:id="c1"> complained about pain in neck and left foot. </text:meta> </text:p> <text:p xml:id="c2"> In the afternoon he reported additional pain in head and stomach. </text:p>
Note: Using xml:id and bundling in RDF/XML is the only approach to describe a set of nonsequential elements. To be clarifed: Why has Dublin Core deprecated RDF Containers? http://dublincore.org/documents/2006/05/29/dc-rdf-notes/
11 Bookmark elements are paragraph content. Therefore even when a user selects all paragraphs from a document, their content is the subject of the metadata.
09-10-22-ODF-MetaData-Examples.odt Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 11 of 19 October 22, 2009
<text:bookmark-start text:name="Mark 1" xml:id="c1"/> complained about pain in neck and left foot. </text:p> <text:p> In the afternoon he reported additional pain in head and stomach. <text:bookmark-end text:name="Mark 1"/> </text:p>
Bookmarks are milestone XML elements. They occur only within paragraph elements but exist outside the XML hierarchy. This enables them to mark content that exists outside of a paragraph, such as a table between two paragraphs.
5 Metadata Scenarios
There are three different kinds of scenarios between metadata and the parts of the viewed content of the OpenDocument file: 1. Content is being described by Metadata 2. Content is being created based on Metadata 3. Content is tagged as Metadata Each of them is used for different scenarios and identified in the content of the OpenDocument format by a different binding technique.
Content Example
<text:section xml:id="Sect1" text:style-name="Sect1" text:name="PhysicalExamData"> <text:h text:style-name="Heading_20_3" text:outline-level="3">PHYSICAL EXAMINATION</text:h> <text:p text:style-name="Standard"> <text:meta xml:id="p2"> VITALS: <text:meta xml:id="p3">Temperature: 36.2 </text:meta>, <text:meta xml:id="p4">Pulse: 1.05Hz</text:meta> <text:meta xml:id="p5">Respiration: 0.2Hz </text:meta> </text:meta> </text:p> </text:section>
Content Example
The citation field in the OpenDocument format is saved as a <text:meta-field> element, which is always part of a paragraph. The <text:meta-field> is not a simple text field, as it is not restricted to text, but may contain arbitrary paragraph content. The anchor to the metadata is established by the xml:id attribute.
<text:p text:style-name="Standard"> It can be assumed the patient was infected from pigs. <text:meta-field xml:id="citation-1"> (<text:meta-field xml:id="citation-1-r1"> Doe, 1999 </text:meta-field>; <text:meta-field xml:id="citation-1-r2"> Smith, 2000 </text:meta-field>) </text:meta-field> </text:p>
Bibliography.rdf13
<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:bibtex="http://purl.oclc.org/NET/nknouf/ns/bibtex#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/" xmlns:foaf="http://xmlns.com/foaf/0.1/" > <bibtex:Article rdf:about="info:pmid/17445913"> <dc:title>Neuraminidase inhibitor susceptibility of porcine H3N2 influenza A viruses isolated in Germany between 1982 and 1999.</dc:title> <dcterms:abstract>As an intermediate host of avian and human influenza A viruses (FLUAV) pigs may play a potential role in interspecies virus transmission and reassortment of viral genes including those conferring antiviral drug resistance. Porcine FLUAV isolated in Germany between 1989 and 2001 contains mutations in the M2 gene inducing amantadine resistance. No data exist on neuraminidase inhibitor (NAI) susceptibility of these porcine FLUAV. We studied the antiviral activity of NAI against seven selected H3N2 FLUAV isolated from pigs in Germany between 1982 and 1999. All isolates were susceptible towards oseltamivir and zanamivir in neuraminidase enzymeinhibition assays. Both compounds inhibited virus spreading and reduced the virus yields and plaque size at low concentrations. Higher concentrations were necessary to reduce the plaque number. Two isolates that differed in glycosylation pattern of viral hemagglutinin (HA) showed markedly reduced drug susceptibility in cell culture-based assays.</dcterms:abstract> <dc:creator>K Bauer</dc:creator> <dc:creator>C Schrader</dc:creator> <dc:creator>J Suess</dc:creator> <dc:creator>P Wutzler</dc:creator> <dc:creator>M Schmidtke</dc:creator> <foaf:maker> <foaf:Person rdf:about="http://purl.org/net/hubmed/ns/pmids/17445913/authors/Bauer,K" > <foaf:name>K Bauer</foaf:name> <rdf:value>K Bauer</rdf:value> <foaf:givenname></foaf:givenname> <foaf:surname>Bauer</foaf:surname> </foaf:Person> </foaf:maker> <foaf:maker> <foaf:Person rdf:about="http://purl.org/net/hubmed/ns/pmids/17445913/authors/Schrader ,C">
<foaf:name>C Schrader</foaf:name> <rdf:value>C Schrader</rdf:value> <foaf:givenname></foaf:givenname> <foaf:surname>Schrader</foaf:surname> </foaf:Person> </foaf:maker> <foaf:maker> <foaf:Person rdf:about="http://purl.org/net/hubmed/ns/pmids/17445913/authors/Suess,J" > <foaf:name>J Suess</foaf:name> <rdf:value>J Suess</rdf:value> <foaf:givenname></foaf:givenname> <foaf:surname>Suess</foaf:surname> </foaf:Person> </foaf:maker> <foaf:maker> <foaf:Person rdf:about="http://purl.org/net/hubmed/ns/pmids/17445913/authors/Wutzler, P"> <foaf:name>P Wutzler</foaf:name> <rdf:value>P Wutzler</rdf:value> <foaf:givenname></foaf:givenname> <foaf:surname>Wutzler</foaf:surname> </foaf:Person> </foaf:maker> <foaf:maker> <foaf:Person rdf:about="http://purl.org/net/hubmed/ns/pmids/17445913/authors/Schmidtk e,M"> <foaf:name>M Schmidtke</foaf:name> <rdf:value>M Schmidtke</rdf:value> <foaf:givenname></foaf:givenname> <foaf:surname>Schmidtke</foaf:surname> </foaf:Person> </foaf:maker> <dc:identifier>10.1016/j.antiviral.2007.03.007</dc:identifier> <prism:publicationName>Antiviral Res</prism:publicationName> <prism:publicationDate>2007-09</prism:publicationDate> <prism:volume>75</prism:volume> <prism:number>3</prism:number> <prism:startingPage>219</prism:startingPage> <prism:endingPage>226</prism:endingPage> <prism:isPartOf rdf:resource="urn:issn:0166-3542"/> </bibtex:Article> </rdf:RDF>
Content Example
<text:p text:style-name="Standard"> The patient name is: <text:meta xhtml:about="http://ex-hospital-DB/patients/ID98765" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xhtml:property="vcard:fn"> John Smith </text:meta> </text:p>
Note: It is not part of this specification how metadata information will be added to the document. For instance, what kind of metadata tools are being used together with the ODF application to enable an efficient handling in the daily routine of a hospital.
AppendixA.References
[RFC3987] M. Duerst, M. Suignard, Internationalized Resource Identifiers (IRIs), http://www.ietf.org/rfc/rfc3987.txt, , 2005. WEBARCH: Ian Jacobs, Norman Walsh, Architecture of the World Wide Web, Volume One, 2004