Re: Encoding key-value pairs in an <abstract>
Martin Holmes <[email protected]>
| Newsgroups | gmane.text.tei.general |
|---|---|
| Message-ID | <[email protected]> |
Hi there, The way we do this sort of thing is: 1. Create a centralized set of <taxonomy> elements, one for each type of classification we want to apply to documents, with <category>s for each type -- so something like <taxonomy xml:id="taxDocType"> <category xml:id="dtWrit"><catDesc>Writ....</catDesc></category> [...] </taxonomy> Then in the <textClass> of each document, add any relevant category references: <textClass> <catRef target="tdt:dtWrit"/> [...] </textClass> The private URI prefix is documented using a <prefixDef> element. The advantage of this is that you can easily combine a whole set of different types of categorizations from different taxonomies; your taxonomies are centrally defined, clearly documented, and easily maintained; and in our case at least, we can process the taxonomies to create <valList>s in our ODD file so that the range of options available for e.g. catRef/@target is constrained and documented in the schema, making encoding much easier. You can see example taxonomies in this file: <http://mapoflondon.uvic.ca/includes.xml> and example catRefs in this: <http://mapoflondon.uvic.ca/ABCH1.xml> Hope this helps, Martin On 2016-12-08 10:24 AM, John P. McCaskey wrote: > What is the best way to encode abstracts that are essentially just key-value pairs? > > Consider formulaic abstracts such as these: > > This document is a [writ|deed|charter]. The court of authority is [papal|secular]. The witness to the document is [insert someone’s name]. > > The inventor was [insert name]. The researched drug was [insert chemical name]. The test facility was [hospital|military facility|university]. > > Only the parameters are important. I don’t really need the introductory words. > > I’m looking for something like this: > <abstract> > <list> > <item type="type">charter</item> > <item type="court">secular</item> > <item type="witness">someone’s name</item> > </list> > </abstract> > > But @type isn’t an attribute of <item> and <item> seems semantically wrong. <keywords> doesn’t work for key-value pairs. <classCode> doesn’t seem right. <catRef> seems overly complicated. > > What is the best approach, sticking to the stock schema? > > -- >