09 10 22 odf metadata examples

Upload: ashokh

Post on 05-Apr-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 09 10 22 ODF Metadata Examples

    1/19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    2/19

    Table of Contents

    1 Overview......................................................................................................................................3

    2 RDF/XML: a Brief Overview..........................................................................................................53 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

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 2 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    3/19

    1 OverviewMetadata lies at the heart of making documents more useful for their authors and subsequentusers. 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 theirchoice.

    The Metadata SC of the OpenDocument TC at OASIS developed nineteen use cases that shapedthe 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 washow to make that possible. The resolution of that question requires extensible metadata as nocommittee 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 ResourceDescription Framework (RDF). RDF provides a flexible and extensible data standard that allowsusers and organizations to describe their documents in ways that fit their own needs. Thecontribution 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 October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 3 of 19

    http://www.oasis-open.org/apps/org/workgroup/office-metadata/download.php/20622/Metadata_UseCases8Oct2006.odthttp://www.oasis-open.org/apps/org/workgroup/office-metadata/download.php/20622/Metadata_UseCases8Oct2006.odt
  • 7/31/2019 09 10 22 ODF Metadata Examples

    4/19

    A complete explanation of RDF is beyond the scope of this document but a short overview isprovided to orient the reader to the mechanisms added to support the use of RDF inOpenDocument documents.2

    The overview of RDF is followed by Storing Extensible Metadata, Describing Document Contentand we conclude with Metadata Scenarios to provide a glimpse of the future that is made practicalby 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 documentis maintained by the OpenDocument Metadata SC so please contribute examples for inclusion atthe SC's webpage at: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-metadata.

    A more detailed reference document with longer examples and accompanied by example files isin preparation by the Metadata SC. The current version of that document is available at the SCwebsite.

    2The examples in this document expose the underlying ODF and RDF mechanisms in a way thatwould not be seen by the average author/user of a document. That is to say that implementationswill hide many of the details ofhowthe metadata mechanisms work while providing users withthe benefits of using RDF based metadata.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 4 of 19

    http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-metadatahttp://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-metadatahttp://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-metadatahttp://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-metadatahttp://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-metadata
  • 7/31/2019 09 10 22 ODF Metadata Examples

    5/19

    2 RDF/XML: a Brief OverviewThis overview does not cover RDF/XML in detail. Only the RDF concepts that are necessary forbasic use of the new metadata features are covered below. RDF is a complex specification andcan be used in full with OpenDocument files. For more detailed information on RDF readersshould consult the RDF page at the W3C.3

    An RDF statement has three parts, a subject, a verb and an object. It is like the simple grammartaught in grade school but has power that those grammar lessons did not.

    Assume that we want to make the following statement into an RDF statement:

    Patrick (subject) has (verb) big feet (object)

    In that case we would have the following (in one RDF syntax)4:

    .

    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 otherinformation about Patrick that uses the same identifier. Second, in an OpenDocument format, wecan enter that information only once for each subject and every time that subject appears, it hasthe same metadata.

    The subject and verb of an RDF statement are always written using an IRI (InternationalizedResource Identifier) [RFC3987]. The object can also be written using an IRI, but often in anOpenDocument document the object will be some text in the document. This enables the user tomake statements about the content in an OpenDocument document.

    All of the RDF statements in the following examples use the simple model set forth above. (Thereare 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. Theonly 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 October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 5 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    6/19

    3 Storing Extensible Metadata

    To introduce the mechanisms developed to store extensible metadata in OpenDocument files, thefollowing facts are presumed: A medical document has been prepared concerning a fictitiouspatient and his treating physician.

    In the introductory example, the name of the treating physician occurs in the footer of thedocument (visible to the user), and additional metadata about the physician is stored in thedocument (invisible to the user). The editing of the metadata that is invisible to the user isapplication specific.

    The storage of RDF metadata in an OpenDocument package uses three types of files:

    Content Files, see 3.1

    RDF/XML Metadata, see 3.2

    Metadata Manifest, see 3.3

    3.1 Content Files

    The content files are the files that contain the content to which metadata refers.

    In the case of OpenDocument, the content file is either the content.xml file, or the styles.xml file(in case of referring to the content of a footer or header, being part of a page style). The contentfile contains what the user sees as the content of a document that they are viewing or editing.The content file is controlled by the OpenDocument application.

    The following fragment of a styles.xml file shows a footer, where a element surroundsthe treating physician's name (Dr. J. Franklin). This paragraph has an identifier called xml:id.

    The xml:id enables the linking of metadata to a particular portion of text.

    Hospital Encounter NoteDr.J.Franklin

    3.2 RDF/XML Metadata Files

    RDF/XML metadata files record additional information describing or augmenting content; in thiscase, for the treating physician Dr. J. Franklin, stating his medical specialty.6

    Metadata files are stored as part of the OpenDocument package.7

    6 It should be noted that recording the information in metadata allows this information to bereused without re-entering the information the next time Dr. J. Franklin is encountered in thetext.

    7 There are more advanced ways to store metadata for OpenDocument files. See the AdvancedExamples document at the Metadata SC website for details.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 6 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    7/19

    Here is a fragment of an RDF/XML file (e.g. /meta/hospital/doctor.rdf) for Dr. James Franklin:

    Neurologist

    3.3 The Metadata Manifest

    The metadata manifest file enumerates the files in the OpenDocument document that maycontain metadata; this includes the content.xml and styles.xml, which may contain inline RDFaannotations, and any number of user-defined RDF/XML files.

    The metadata manifest is itself a metadata file and stored as RDF/XML.

    For every user-defined metadata file, the storage location is given by a URI relative to themetadata manifest itself. Furthermore, annotations that specify what is contained in the user-

    defined metadata file should be given, so that a metadata consuming application can identifywhich metadata files in the document contain metadata the application is interested in.

    It is recommended that application-specific metadata annotations for individual content elementsnot be inserted directly in the metadata manifest, but into a user-defined metadata file. In thisway, different applications may add different annotations to the same content element withoutcreating conflicts.8

    Here an example of a basic metadata manifest file (/manifest.rdf):

    8 Different applications may even create annotations that contradict each other. As long as theapplications do not look at each other's annotations, this will work.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 7 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    8/19

    4 Describing Document ContentThe metadata mechanisms of OpenDocument (1.2) can be conveniently described in XML termsas operating on three different categories of content as follows:

    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 theviewed content)

    4.1 Metadata describing the OpenDocument Document

    In order to attach metadata to the OpenDocument document as a whole, the document has to beidentified by an IRI. That IRI identifying the document itself is in general the URL of theOpenDocument package concatenated with the relative path of the document within thepackage.. For example, an embedded document stored in the directory someobject of an ODF

    package at http://example.org/foo.odt will have the IRI http://example.org/foo.odt/someobject/ 9

    .The metadata files contained in the ODF package will of course refer to the contents of thepackage by relative IRIs.

    Metadata Manifest Example

    In a metadata manifest a resource with the type represents the document.

    Alternative RDF view in N3:

    @prefix pkg: .@prefix rdf: . a pkg:Document .

    RDF/XML Metadata Example

    Metadata describing the document is added to a RDF/XML file in form of RDF statementsreferring to the IRI identifying the document.

    For example, an RDF statement can be added to say that the document is an encounter note (i.e.http://hospital/documents/encouter-note).

    9 Note that this is not a URI which can be dereferenced. This is most unfortunate, but there iscurrently no standard URI scheme for ZIP-based packages.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 8 of 19

    http://example.org/foo.odthttp://example.org/foo.odt/someobject/http://example.org/foo.odthttp://example.org/foo.odt/someobject/
  • 7/31/2019 09 10 22 ODF Metadata Examples

    9/19

    Alternative RDF view in N3:

    @prefix pkg: .@prefix rdf: .

    a pkg:Document . a

    .

    4.2 Metadata describing an OpenDocument Element

    Metadata has traditionally been applied at the entire document level. But, to have the granularity

    necessary to meet many of the use cases, metadata must be applied at the level of individualOpenDocument elements. For example, attaching metadata to any given OpenDocumentparagraph element.10

    For purposes of illustration, the initial example is extended to include a fictitious patient JohnSmith. Now the document contains both personal data about the patient and medical notes fromhis treating physician.

    Assume that a text section includes the results of a physical examination of a patient.

    The visible content might appear as:

    PHYSICAL EXAMINATIONVITALS: Temperature: 36.2, Pulse: 1.05Hz, Respiration: 0.2Hz

    Content Example

    The content.xml for the above document view consists of a text section, a heading and twoparagraphs. The surrounding section is identified by an xml:id attribute:

    PHYSICAL EXAMINATION

    VITALS:Temperature: 36.2,Pulse: 1.05Hz,Respiration: 0.2Hz

    To attach metadata to this section, the xml:id value Sect1 will be referenced directly from theRDF/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 usuallyabout the content of the element.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 9 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    10/19

    Relative URLs are made absolute by using the URL of the document as base URI on loading. As aconsequence, changing the location of the document (e.g., by moving it to some other place inthe file system) will lead to different absolute URIs being generated for the contained contentelements. This has the advantage that it is possible to tell apart the metadata for differentversions of the same document. Because references within the document are stored as relativeURIs, they are unaffected by changes in the storage location. But references from outside thedocument may break. If it is necessary to reference a content element independent of thedocument location, the RDF predicate owl:sameAs may be used to create a stable URI alias. Butplease note that creating URI aliases also has drawbacks (see [WEBARCH]).

    RDF/XML Metadata Example

    The IRI identifying the element is used in the user defined RDF/XML metadata files to add RDFstatements about the text section. In this example the metadata consists of medical details aboutthe physical examination of the patient.

    For example the metadata RDF/XML file medical/physicalExam.rdf might contain the following:

    Just as with elements, metadata can be added to any of the more than fortyOpenDocument elements that have an xml:id attribute.

    4.3 Metadata describing a Part of the Document

    When content that spans more than one OpenDocument element requires metadata there aretwo possible techniques available:

    1. Identifying the selected part by the contained OpenDocument elements, each identifiedvia xml:id

    2. Inserting a and element toembrace the content of various OpenDocument elements (in case of a sequential part ofcontent)

    Content Example (xml:id)

    To attach metadata to a set of OpenDocument elements the binding mechanism earlierintroduced for one element is applied on each element of the set.

    Every element of this set will have a different xml:id.

    The set of IRIs representing ODF elements may be bundled in RDF Containers and RDFCollections in the metadata RDF/XML files.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 10 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    11/19

    Notes from Monday

    The patient John Smith came in the morning andcomplained about pain in neck and left foot.

    In the afternoon he reported additional pain in head and stomach.

    Metadata Manifest Example (xml:id)

    Note: Using xml:id and bundling in RDF/XML is the only approach to describe a set of non-sequential elements.

    To be clarifed: Why has Dublin Core deprecated RDF Containers?

    http://dublincore.org/documents/2006/05/29/dc-rdf-notes/

    Content Example (Bookmarks)

    In order to attach metadata to sequential content, such as a text selection by the user of variousparagraphs, OpenDocument bookmark elements may be used.

    The XML content would be embraced by two standalone elements and marking the region.11

    The starts within the first paragraph and the ends within the last paragraph, therefore not the paragraph elements are included, but thecontent is included.

    Notes from Monday

    The patient John Smith came in the morning and

    11 Bookmark elements are paragraph content. Therefore even when a user selects allparagraphs from a document, their content is the subject of the metadata.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 11 of 19

    http://docs.oasis-open.org/opendocument/meta/package#http://docs.oasis-open.org/ns/office/1.2/meta/odfhttp://docs.oasis-open.org/opendocument/meta/package#http://docs.oasis-open.org/ns/office/1.2/meta/odf
  • 7/31/2019 09 10 22 ODF Metadata Examples

    12/19

    complained about pain in neck and left foot.

    In the afternoon he reported additional pain in head and stomach.

    Bookmarks are milestone XML elements. They occur only within paragraph elements but existoutside the XML hierarchy. This enables them to mark content that exists outside of a paragraph,such as a table between two paragraphs.

    Metadata Manifest Example (Bookmarks)

    RDF/XML Metadata Example (Bookmarks)

    For example the metadata RDF/XML file medical/physicalExam.rdf might contain the following:

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 12 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    13/19

    5 Metadata ScenariosThere are three different kinds of scenarios between metadata and the parts of the viewed contentof 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 OpenDocumentformat by a different binding technique.

    5.1 Content described by Metadata

    Classic metadata is attached to particular content of a document.

    In this scenario the document editor associates part of the document with metadata. In general

    this is done by hiding the RDF statements from the user, who is only interfacing with a metadataaware component which performs the binding of the metadata to the content target.

    This binding is expressed in the OpenDocument format by using the xml:id attribute on one ofthe xml:id capable OpenDocument elements to identify the element containing the content to bedescribed.12

    Content Example

    PHYSICAL EXAMINATION

    VITALS:Temperature: 36.2

    ,Pulse: 1.05HzRespiration: 0.2Hz

    Content created from Metadata

    This scenario involves the usage of a metadata aware application (i.e. a plug-in for anOpenDocument application) to insert a field within any paragraph. The content of the field isgenerated by the metadata application based on metadata.

    In our scenario Dr. J. Franklin takes advantage of a citation plug-in based on metadata, that useshis own GUI to let him choose to quote from a list of medical article and the citation is saved inthe medical document.

    12When the subpart of a paragraph should be described, there are two OpenDocument elementsavailable. The element should be preferred in this case as the has a different function.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 13 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    14/19

    Content Example

    The citation field in the OpenDocument format is saved as a element,which is always part of a paragraph. The is not a simple text field, as it isnot restricted to text, but may contain arbitrary paragraph content.

    The anchor to the metadata is established by the xml:id attribute.

    It can be assumed the patient was infected from pigs.

    (Doe, 1999

    ;

    Smith, 2000)

    Metadata Manifest Example

    RDF/XML Metadata Example

    Citation.rdf

    1

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 14 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    15/19

    223

    Bibliography.rdf13

    Neuraminidase inhibitor susceptibility of porcine H3N2

    influenza A viruses isolated in Germany between 1982 and1999.As an intermediate host of avian and human

    influenza A viruses (FLUAV) pigs may play a potential role ininterspecies virus transmission and reassortment of viral genesincluding those conferring antiviral drug resistance. Porcine FLUAVisolated in Germany between 1989 and 2001 contains mutations in the M2gene inducing amantadine resistance. No data exist on neuraminidaseinhibitor (NAI) susceptibility of these porcine FLUAV. We studied theantiviral activity of NAI against seven selected H3N2 FLUAV isolatedfrom pigs in Germany between 1982 and 1999. All isolates weresusceptible towards oseltamivir and zanamivir in neuraminidase enzyme-inhibition assays. Both compounds inhibited virus spreading and reducedthe virus yields and plaque size at low concentrations. Higherconcentrations 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-basedassays.

    K BauerC SchraderJ SuessP WutzlerM Schmidtke

    K BauerK Bauer

    Bauer

    13 Taken from http://www.hubmed.org/

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 15 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    16/19

    C SchraderC SchraderSchrader

    J SuessJ SuessSuess

    P WutzlerP Wutzler

    Wutzler

    M SchmidtkeM SchmidtkeSchmidtke

    10.1016/j.antiviral.2007.03.007

    Antiviral Res2007-09753219226

    5.2 Content equivalent to Metadata

    Whenever a text portion of the document is also used as metadata at the same time (RDF literal),the text portion should not exist both in the metadata and content files.

    Duplicating data risks inconsistency between the RDF/XML file (readable for RDF applications)and the OpenDocument content (readable for humans).

    As the text portion should be viewable by ODF applications that are not able to process metadata,the literal should solely exist in the content.

    There are five OpenDocument elements that support in content metadata.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 16 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    17/19

    Content Example

    The patient name is:John Smith

    RDF/XML Metadata Example

    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 toenable an efficient handling in the daily routine of a hospital.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 17 of 19

    http://ex-hospital-db/patients/ID98765http://ex-hospital-db/patients/ID98765
  • 7/31/2019 09 10 22 ODF Metadata Examples

    18/19

    6 Metadata Proposal's FAQ

    1. section 1.1 says: Applications that read and write documents should preserve all

    metadata files. Why is it not a must?Because when the document is being edited by an OpenDocument application that is notcapable of using metadata, the application should get the chance to drop the metadata toprevent inconsistencies between the metadata and the viewed content.

    2. Why do we need Named Graphs?

    Named graphs are a mechanism used to refer to a particular RDF graph in a set ofgraphs using its name, that is an IRI. In an OpenDocument package. a named graph isalways represented as an RDF/XML File There may be an arbit rary number of namedgraphs in a single document, which allows for separating the metadata for differentconsumers, even if those consumers want to annotate the same ODF document content

    element.

    3. Why are in-content metadata attributes (i.e. xhtml:about, xhtml:property,xhtml:content and xhtml:datatype) not allowed on ?

    The content of is meant to be created from metadata. Describingit again by metadata seems redundant.

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009Copyright OASIS Open 2002 - 2009. All Rights Reserved.Page 18 of 19

  • 7/31/2019 09 10 22 ODF Metadata Examples

    19/19

    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

    09-10-22-ODF-MetaData-Examples.odt October 22, 2009