Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace <classification> with <classDecl> #430

Closed
pe-ro opened this issue May 1, 2017 · 6 comments
Closed

Replace <classification> with <classDecl> #430

pe-ro opened this issue May 1, 2017 · 6 comments

Comments

@pe-ro
Copy link
Contributor

pe-ro commented May 1, 2017

Because it is trying to function similarly to TEI's <classDecl> and <textClass>, the <classification> element is too complex and confusing. To provide a simpler approach to the encoding of taxonomic terms, the following changes are proposed --

  • replace <classification> and its sub-elements with <classDecl> whose model is (model.headLike*, taxonomy*);
  • <taxonomy> has the model (model.biblLike?, desc*, (category|taxonomy)*), which provides for a bibliographic citation, multiple descriptions of the taxonomy (perhaps in different languages), and taxonomic categories;
  • <category> represents a taxonomic category; its model is (desc+, category*), in which <desc> carries the taxonomic term (again, perhaps in multiple languages).

Notes --

  • a class declaration may contain multiple taxonomies;
  • a taxonomy may contain zero or more subordinate taxonomies;
  • categories may be nested to accommodate hierarchical classification arrangements;
  • while <termList> will disappear, <term> will still be available at the textual phrase level;
  • instead of referring to a <term> in the header, @class will now hold a reference to one or more <category> elements;
  • since it's another kind of description, <classCode> can be replaced by <desc>;
  • @data is retained to provide a directional link from a category to the entity that exemplifies it.

Here's some sample markup --

<classDecl>
  <head>My Classification Schemes</head>
  <taxonomy>
    <bibl>Subject Headings (polyglot)</bibl>
    <category xml:id="cat01" corresp="#cat02"
      auth.uri="http://id.loc.gov/authorities/subjects/sh85129035">
      <desc xml:lang="eng">String quartets</desc>
      <desc xml:lang="rus">[Russian translation of "string quartets"]</desc>
    </category>
  </taxonomy>
  <taxonomy>
    <bibl>Bibliothèque nationale de France</bibl>
    <category xml:id="cat02" corresp="#cat01">
      <desc xml:lang="fre">Quatuors à cordes</desc>
    </category>
  </taxonomy>
  <taxonomy>
    <bibl>Hildegard von Hildegard, Neume Classification in Three Easy Steps</bibl>
    <category xml:id="HPunctum">
      <desc>Punctum</desc>
    </category>
    <category xml:id="HTractulus">
      <desc>Tractulus</desc>
    </category>
    <category xml:id="HOriscus">
      <desc>Oriscus</desc>
    </category>
  </taxonomy>
</classDecl>

Here's the ODD which implements these changes --

<elementSpec ident="expression" module="MEI.frbr" mode="replace">
<desc>Intellectual or artistic realization of a work.</desc>
  <classes>
    <memberOf key="att.bibl"/>
    <memberOf key="att.common"/>
    <memberOf key="att.dataPointing"/>
    <memberOf key="model.expressionLike"/>
  </classes>
  <content>
    <rng:zeroOrMore>
      <rng:ref name="model.identifierLike"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="titleStmt"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="model.workIdent"/>
    </rng:zeroOrMore>
    <rng:zeroOrMore>
      <rng:ref name="otherChar"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="creation"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="history"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="langUsage"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="perfMedium"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="perfDuration"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="extent"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="scoreFormat"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="contents"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="context"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="biblList"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="notesStmt"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="classDecl"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="componentGrp"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="relationList"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="extMeta"/>
    </rng:zeroOrMore>
  </content>
  <remarks>
    <p>The <gi scheme="MEI">perfDuration</gi> element captures the <emph>intended duration</emph>
      of the expression, while <gi scheme="MEI">extent</gi> records scope of the expression in
      other terms, such as number of pages, measures, etc.</p>
  </remarks>
</elementSpec>
<elementSpec ident="item" module="MEI.frbr" mode="replace">
  <desc>Single instance or exemplar of a source/manifestation.</desc>
  <classes>
    <memberOf key="att.bibl"/>
    <memberOf key="att.common"/>
    <memberOf key="att.dataPointing"/>
    <memberOf key="att.pointing"/>
    <memberOf key="att.targetEval"/>
    <memberOf key="model.itemLike"/>
  </classes>
  <content>
    <rng:zeroOrMore>
      <rng:ref name="model.identifierLike"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="availability"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="physDesc"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="physLoc"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="history"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="notesStmt"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="classDecl"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="componentGrp"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="relationList"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="extMeta"/>
    </rng:zeroOrMore>
  </content>
</elementSpec>
<elementSpec ident="source" module="MEI.header" mode="replace">
  <desc>A bibliographic description of a source used in the creation of the electronic
    file.</desc>
  <classes>
    <memberOf key="att.bibl"/>
    <memberOf key="att.common"/>
    <memberOf key="att.dataPointing"/>
    <memberOf key="att.pointing"/>
    <memberOf key="att.targetEval"/>
    <memberOf key="model.manifestationLike"/>
  </classes>
  <content>
    <rng:zeroOrMore>
      <rng:ref name="model.identifierLike"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="titleStmt"/>
    </rng:optional>
    <rng:ref name="macro.bibldescPart"/>
    <rng:optional>
      <rng:ref name="history"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="langUsage"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="contents"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="biblList"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="notesStmt"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="classDecl"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="itemList"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="componentGrp"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="relationList"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="extMeta"/>
    </rng:zeroOrMore>
  </content>
  <remarks>
    <p>Multiple <gi scheme="MEI">physDesc</gi> sub-elements may be used to describe the physically
      separate parts of a single source. The <att>data</att> attribute may be used to reference
      one or more features that occur in this particular source. A URI referencing a description
      of the related item may be placed in the <att>target</att> attribute.</p>
  </remarks>
  <remarks>
    <p>This element is modelled on elements in the Text Encoding Initiative (TEI) and Encoded
      Archival Description (EAD) standards.</p>
  </remarks>
</elementSpec>
<elementSpec ident="work" module="MEI.header" mode="replace">
  <desc>Provides a detailed description of a work, specifically its history, language use, and
    high-level musical attributes: key, tempo, meter, medium of performance, and intended
    duration.</desc>
  <classes>
    <memberOf key="att.bibl"/>
    <memberOf key="att.common"/>
    <memberOf key="att.dataPointing"/>
    <memberOf key="model.workLike"/>
  </classes>
  <content>
    <rng:zeroOrMore>
      <rng:ref name="model.identifierLike"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="titleStmt"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="model.workIdent"/>
    </rng:zeroOrMore>
    <rng:zeroOrMore>
      <rng:ref name="otherChar"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="creation"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="history"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="langUsage"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="perfMedium"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="perfDuration"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="audience"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="contents"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="context"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="biblList"/>
    </rng:zeroOrMore>
    <rng:optional>
      <rng:ref name="notesStmt"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="classDecl"/>
      <!--<rng:ref name="classification"/>-->
    </rng:optional>
    <rng:optional>
      <rng:ref name="expressionList"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="componentGrp"/>
    </rng:optional>
    <rng:optional>
      <rng:ref name="relationList"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="extMeta"/>
    </rng:zeroOrMore>
  </content>
  <remarks>
    <p>The <gi scheme="MEI">perfDuration</gi> element captures the <emph>intended duration</emph>
      of the work.</p>
  </remarks>
</elementSpec>
<classSpec ident="att.classed" module="MEI.shared" type="atts" mode="replace">
  <desc>Attributes which can be used to classify features.</desc>
  <attList>
    <attDef ident="class" usage="opt">
      <desc>Contains one or more URIs which denote classification terms that apply to the entity
        bearing this attribute. A fragment identifier may be employed to point to a category
        element in the MEI header.</desc>
      <datatype maxOccurs="unbounded">
        <rng:ref name="data.URI"/>
      </datatype>
      <constraintSpec ident="check_classURI" scheme="isoschematron">
        <constraint>
          <sch:rule context="@class">
            <sch:assert role="warning" test="not(normalize-space(.) eq '')">@class attribute
              should have content.</sch:assert>
            <sch:assert role="warning"
              test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:category/@xml:id or matches($i, '^([a-z]+://|\.{1,2}/)')"
              >The value in @class should correspond to the @xml:id attribute of a category
              element or be an external URL.</sch:assert>
          </sch:rule>
        </constraint>
      </constraintSpec>
    </attDef>
  </attList>
</classSpec>  
<classSpec ident="att.classCodeIdent" module="MEI.shared" type="atts" mode="delete"/>
<elementSpec ident="classification" module="MEI.header" mode="delete"/>
<elementSpec ident="termList" module="MEI.header" mode="delete"/>
<elementSpec ident="classDecl" module="MEI.header" mode="add">
  <desc>Groups information which describes the nature or topic of an entity.</desc>
  <classes>
    <memberOf key="att.bibl"/>
    <memberOf key="att.common"/>
  </classes>
  <content>
    <rng:zeroOrMore>
      <rng:ref name="model.headLike"/>
    </rng:zeroOrMore>
    <rng:zeroOrMore>
      <rng:ref name="taxonomy"/>
    </rng:zeroOrMore>
  </content>
  <remarks>
    <p>Although the use of names and terms from locally controlled vocabularies is possible, best
      practice suggests that terms should come from standard national or international
      vocabularies whenever they are available in order to enable searches in systems that include
      multiple MEI documents, or MEI documents and bibliographic records from many
      institutions.</p>
  </remarks>
</elementSpec>
<elementSpec ident="taxonomy" module="MEI.header" mode="add">
  <desc/>
  <classes>
    <memberOf key="att.bibl"/>
    <memberOf key="att.common"/>
  </classes>
  <content>
    <rng:choice>
      <rng:optional>
        <rng:ref name="model.biblLike"/>
      </rng:optional>
      <rng:zeroOrMore>
        <rng:ref name="desc"/>
      </rng:zeroOrMore>
    </rng:choice>
    <rng:zeroOrMore>
      <rng:choice>
        <rng:ref name="category"/>
        <rng:ref name="taxonomy"/>
      </rng:choice>
    </rng:zeroOrMore>
  </content>
</elementSpec>
<elementSpec ident="category" module="MEI.header" mode="add">
  <desc/>
  <classes>
    <memberOf key="att.bibl"/>
    <memberOf key="att.common"/>
    <memberOf key="att.dataPointing"/>
  </classes>
  <content>
    <rng:oneOrMore>
      <rng:ref name="desc"/>
    </rng:oneOrMore>
    <rng:zeroOrMore>
      <rng:ref name="category"/>
    </rng:zeroOrMore>
  </content>
</elementSpec>
<elementSpec ident="term" module="MEI.shared" mode="replace">
  <desc>Keyword or phrase which describes a resource.</desc>
  <classes>
    <memberOf key="att.common"/>
    <memberOf key="att.lang"/>
    <memberOf key="model.textPhraseLike.limited"/>
  </classes>
  <content>
    <rng:zeroOrMore>
      <rng:choice>
        <rng:text/>
        <rng:ref name="model.textPhraseLike.limited"/>
      </rng:choice>
    </rng:zeroOrMore>
  </content>
  <remarks>
    <p>This element is modelled on an element in the Text Encoding Initiative (TEI) standard.</p>
  </remarks>
</elementSpec>
@pe-ro
Copy link
Contributor Author

pe-ro commented May 2, 2017

Doh! Let's try this again --

  • <classDecls> (plural) should be a child of <encodingDesc>
  • <classification> should remain where it is to hold either classification terms or references to categories

Taking the Nielsen catalog as an example, here's the <classDecls> (as I understand the DCM classification system) --

<classDecls>
  <taxonomy xml:id="dcmWorkDescription">
    <category xml:id="dcmStageMusic">
      <desc>stage music</desc>
      <category xml:id="dcmOpera">
        <desc>opera</desc>
      </category>
      <category xml:id="dcmIncidentalMusic">
        <desc>incidental music</desc>
      </category>
    </category>
    <category xml:id="dmcInstrumentalMusic">
      <desc>instrumental music</desc>
      <category xml:id="dcmSymphony">
        <desc>symphony</desc>
      </category>
      <category xml:id="dcmConcerto">
        <desc>concerto</desc>
      </category>
      <category xml:id="dcmOtherOrchestralMusic">
        <desc>other orchestral music</desc>
      </category>
      <category xml:id="dcmChamberMusic">
        <desc>chamber music</desc>
      </category>
    </category>
    <category xml:id="dcmVocalMusic">
      <desc>vocal music</desc>
      <category xml:id="dcmVocalSoloistsInstrumentsOptionalChoir">
        <desc>music for vocal soloists and instruments with or without choir</desc>
      </category>
      <category xml:id="dcmChoralMusicWithInstrumental">
        <desc>choral music with instruments</desc>
      </category>
      <category xml:id="dcmUnaccompaniedChoralMusic">
        <desc>a cappella choral music</desc>
      </category>
      <category xml:id="dcmSong">
        <desc>song</desc>
      </category>
    </category>
  </taxonomy>
  <taxonomy xml:id="dcmSourceDescription">
    <category xml:id="dcmContent">
      <desc>content</desc>
      <category xml:id="dcmNotatedMusic">
        <desc>notated music</desc>
      </category>
      <category xml:id="dcmText">
        <desc>text</desc>
      </category>
    </category>
    <category xml:id="dcmPresentation">
      <desc>presentation</desc>
      <category xml:id="dcmManuscript">
        <desc>manuscript</desc>
      </category>
      <category xml:id="dcmPrint">
        <desc>print</desc>
      </category>
    </category>
    <category xml:id="dcmAuthority">
      <desc>authority</desc>
      <category xml:id="dcmAutograph">
        <desc>autograph</desc>
      </category>
      <category xml:id="dcmCopy">
        <desc>copy</desc>
      </category>
      <category xml:id="dcmPartlyAutograph">
        <desc>partly autograph</desc>
      </category>
    </category>
    <category xml:id="dcmScoreFormat">
      <desc>score format</desc>
      <category xml:id="dcmScore">
        <desc>score</desc>
        <category xml:id="dcmPianoScore">
          <desc>piano score</desc>
        </category>
        <category xml:id="dcmShortScore">
          <desc>short score</desc>
        </category>
        <category xml:id="dcmVocalScore">
          <desc>vocal score</desc>
        </category>
      </category>
      <category xml:id="dcmParts">
        <desc>parts</desc>
      </category>
    </category>
    <category xml:id="dcmState">
      <desc>state</desc>
      <category xml:id="dcmSketch">
        <desc>sketch</desc>
      </category>
      <category xml:id="dcmDraft">
        <desc>draft</desc>
      </category>
      <category xml:id="dcmFairCopy">
        <desc>fair copy</desc>
      </category>
      <category xml:id="dcmPrintersCopy">
        <desc>printer's copy</desc>
      </category>
      <category xml:id="dcmFirstEdition">
        <desc>first edition</desc>
      </category>
    </category>
    <category xml:id="dcmCompleteness">
      <desc>completeness</desc>
      <category xml:id="dcmFragment">
        <desc>fragment</desc>
      </category>
      <category xml:id="dcmComplete">
        <desc>complete</desc>
      </category>
      <category xml:id="dcmExcerpt">
        <desc>excerpt</desc>
      </category>
    </category>
  </taxonomy>
</classDecls>

And here is an example of the use of <classification> within <source> --

<classification>
  <termList>
    <term class="#dcmNotatedMusic">notated music</term>
    <term class="#dcmManuscript">manuscript</term>
    <term class="#dcmAutograph">autograph</term>
    <term class="#dcmPianoScore">piano score</term>
    <term class="#dcmSketch">sketch</term>
    <term class="#dcmFragment">fragment</term>
  </termList>
</classification>

Since a taxonomy is present, the content of the <term> elements here is redundant, but it may still be useful for human readers. Of course, when there is no formal taxonomy, the content is essential.

Here's an example of the use of <classification> within <work> --

<classification>
  <termList>
    <term class="#dcmStageMusic">stage music</term>
    <term class="#dcmOpera">opera</term>
  </termList>
</classification>

In this example, the hierarchical relationship between "opera" and "stage music" could be determined from the taxonomy. However, nothing prevents the use of both terms. In fact, doing so could be advantageous in some situations.

If it's not necessary to capture pre-existing, human-readable classification information, then <classification> itself may be redundant. For example, instead of using <classification> one could write --

<work class="#dcmStageMusic #dcmOpera">
  ...
</work>

Since @class is now available on any element, this last use is likely to be the predominant one.

@axgeertinger
Copy link

axgeertinger commented May 2, 2017

👍 +1 from me. As you have noticed from the Nielsen example especially the possibility of nesting categories is indeed useful to us; hitherto we have used @label="level1" and @label="level2" on <termList> elements to suggest a hierarchy of terms in the UI menu.
Just one question: I am not sure why the element describing a taxonomy should be <bibl> and not <desc>. I see that ideally there should be an existing taxonomy to point to with a bibliographic reference, but when defining a taxonomy on the spot there is not. Nevertheless a description or heading would be nice to have in any case, and since <desc> offers <bibl> in its content, a reference to an existing taxonomy could be placed in it if applicable.

@pe-ro
Copy link
Contributor Author

pe-ro commented May 2, 2017

@axgeertinger: I'm glad you approve. But your comment is a little garbled -- it seems you didn't quote something with backticks.

@axgeertinger
Copy link

@pe-ro: Better? Im still in the process of getting on terms with GitHub (very, very slowly...)

@pe-ro
Copy link
Contributor Author

pe-ro commented May 2, 2017

Yes, better.

<bibl> is used in imitation of TEI. More importantly, it also pulls <bibl> out of the mixed content of <desc>. Without this maneuver, <bibl> could get lost in a sea of other stuff. I'd still recommend using <bibl> for interoperability and relegate more prose-like descriptions to <desc>.

The latest version of <taxonomy> --

<elementSpec ident="taxonomy" module="MEI.header" mode="add">
  <desc>Defines a typology either implicitly, by means of a bibliographic citation, or
    explicitly by a structured taxonomy.</desc>
  <classes>
    <memberOf key="att.bibl"/>
    <memberOf key="att.common"/>
  </classes>
  <content>
    <rng:optional>
      <rng:ref name="model.biblLike"/>
    </rng:optional>
    <rng:zeroOrMore>
      <rng:ref name="desc"/>
    </rng:zeroOrMore>
    <rng:zeroOrMore>
      <rng:choice>
        <rng:ref name="category"/>
        <rng:ref name="taxonomy"/>
      </rng:choice>
    </rng:zeroOrMore>
  </content>
</elementSpec>

@pe-ro
Copy link
Contributor Author

pe-ro commented May 4, 2017

Closed by e9b0b9d

@pe-ro pe-ro closed this as completed May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants