[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: citation example
While waiting on the more comprehensive examples document, here's the promised citation example that will illustrate: 1. the new field 2. registering files in the manifest, and 3. the binding mechanism. Svante, please feel to correct me if I have a detail wrong. Moving on ... A citation is an ordered list of references to sources. It may be represented in a number of different styles, and must be able to be regenerated. So user adds a citation to their document with two references. They use an APA style, and it displays like: (Doe, 1999:23; Smith, 2000) In the content file, then, we have a nested field; something like: <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> Now, we have to hook up our RDF/XML to these fields to the RDF. First, we define two RDF graphs (files) and register them in the manifest. Within that, we add a binding to associate content with a stable URI, which we can use to make further statements about (note: this is an abbreviated manifest file just for illustration): <odf:Package rdf:about="urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3" xmlns:odf="http://docs.oasis-open.org/opendocument/meta/package#" xmlns:dcterms="http://purl.org/dc/terms/"> <dcterms:hasPart> <odf:MetadataFile odf:path="citation.rdf"> <odf:Element rdf:about="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d" odf:idref="citation-1-r1"/> <odf:Element rdf:about="urn:uuid:321fc314-69d3-4019-859d-29a5dc2721a0" odf:idref="citation-1-r1"/> </odf:MetadataFile> </dcterms:hasPart> <dcterms:hasPart> <odf:MetadataFile odf:path="bibliography.rdf"/> </dcterms:hasPart> </odf:Package> So we're dealing with four files now: content.xml manifest.rdf citation.rdf bibliography.rdf Note: I have omitted the rdf:RDF wrapper and associated namespace declarations in these RDF/XML examples below. Second, within the citation.rdf file we have the following to encode the field "instructions": <odf:Reference rdf:about="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d"> <dcterms:source rdf:resource="urn:isbn:23983487"/> <!-- to specify the ID/URI for the source --> <odf:position>1</odf:position> <!-- to track position within the list of references --> <cite:pages>23</cite:pages> </odf:Reference> <odf:Reference rdf:about="urn:uuid:321fc314-69d3-4019-859d-29a5dc2721a0"> <dcterms:source rdf:resource="urn:isbn:12902189"/> <odf:position>2</odf:position> </odf:Reference> Finally, within the bibliography.rdf file we store the raw source metadata (for one; I've omitted the other because I'm in a hurry!): <b:Document rdf:about="urn:isbn:23983487"> <b:referenceType="http://zotero.org/types/book"/> <dcterms:creator rdf:resource="http://ex.net/people#jane"/> <dc:title>Some Book Title</dc:title> <dc:date>2000</dc:date> <dcterms:publisher rdf:resource="http://ex.net"/> </b:Document> <vcard:VCard rdf:about="http://ex.net/people#jane"> <!-- note, here, we're using vcard; this could be stored in a contacts.rdf if one wanted --> <vcard:sort-string>Smith, Jane</vcard:sort-string> <!-- obviously could encode much more --> </vcard:VCard> <vcard:VCard rdf:about="http://ex.net/people#jane"> <vcard:fn>ABC Books</vcard:fn> <!-- obviously could encode much more --> </vcard:VCard> Any questions? Bruce
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]