CitationStyleConfigurationConcept

MPDL

 Work in progress

= Citation Style Configuration Concept =

Preamble
Citation Style Configuration Language is a concept of an extensible XML language which allows to define in some common way the representation of the citation styles are generally used among the scientific communities. The following pre-conditions for the concept should be taken into account:
 * The scientific publication data (data source) should be represented in some standardized XML format (eg. eSciDoc PubMan metadata set, MODs, etc.)
 * The Citation Style Configuration should be citation but not data source centric, i.e should be expressed in the terms of the citation elements.
 * The font-formatting styles (like bold, italic or css) of the citation elements should be supported
 * Sorting by the citation elements
 * Reusable variables and grouped part of citations (layout elements), functions
 * Logical triggers?

Model
Citation Style Configuration data model can be defined as UML Data Model Diagram TO BE UPDATED! and as XML Schema. Citation Style (CS) consists of following components:
 * Font Styles
 * Implicit metadata Fields
 * Predefined XPath variables
 * Predefined internal variables
 * Functions
 * Predefined Layout Elements
 * Citation Style Layout Definitions

Citation Style Layout Definition (CSLD) is a Layout Element (LE) or are set of LEs which present a layout logical unit of an citation layout. E.g. layout for citation in genre Artcile. CSLDs can be triggered with expression evaluated on hand of Variables (predefined and current).

Font Styles
define the font style layout for the LE/CSLD. Font style can be referenced in Parameters section of the LE/CSLD:           Location: Here is current Font Styles definition, one for all Citation Styles, i.e. application specific.

TODO:
 * Font Styles per Citation Style definition, i.e. CS specific.
 * XML Schema for Font Styles

Implicit metadata Fields
An CS is always associated with a XML Data Sources which contains metadata to be transformed to the citation. The root of the Data Source is defined in @md-xpath attribute of  element:  ... The elements and attributes of the Data Source can be directly referenced in XPath form: ${publication/dateAccepted} or ${publication/@type}   
 * in variables:
 * in CSLDs/LEs @ref attributes:

Variables
can be used to simplify CS notation. The possible type of variable:  <variable name="date" expression="   ${publication/published-online} != null ?         ${publication/published-online} :         ${publication/issued} != null ?             ${publication/issued} :             ${publication/dateAccepted} != null ?                 ${publication/dateAccepted} :                 ${publication/dateSubmitted} != null ?                     ${publication/dateSubmitted} :                     ${publication/modified} != null ?                         ${publication/modified} :                         ${publication/created} != null ?                             ${publication/created} :                             null" />
 * xpath (predefined XPath Variables) can calculate expression with XPath 1.0:
 * expression (predefined internal Variables) can calculate java-like expression:

The results of calculations will be stored in internal variable which can referenced later in other variables or in CSLDs/LEs.

Special handling of repeatable LEs separately according to position in tree (e.g. for creators)
Repeatable LEs can have separate handling for each element of repetition. The elements can be referenced with attribute @position of and. The and elements with same @position are elements of the position bundle. The possible values of the @position are: 1..n|last|last-max-count|[default]. Example

     <parameters position="last-max-count"> <delimiter value=", LAST_MAX_COUNT_DELIMITER " /> <internal-delimiter value="LAST_MAX_COUNT_INTERNAL_DELIMITER " /> <elements position="last-max-count">   <delimiter value=", " /> <internal-delimiter value=", " /> <max-count value="6"><![CDATA[et al.]]></max-count>   </layout-element> For the moment the only two parameters can be applied to the certain position: delimiter and internal-delimiter.

During the iteration through of repeatable elements the @position index takes certain values which causes certain processing events. Thus we have position specific CS workflow:

Preconditions: <max-count value="6"><![CDATA[et al.]]></max-count>
 * The number of the last element to be output is defined in default bundle, in parameter <max-count>:
 * the repeatable element will be appended in case of last-max-count event with value of the <max-count> element (max-count-ends-with), i.e. with et al. for the snippet case.

Workflow:
 * Event: amount of repeatable elements < max-count
 * 1) exists last bundle
 * 2) apply delimiter and internal-delimiter of the last bundle
 * 3) ignore parameters of the last-max-count bundle
 * 4) ignore max-count-ends-with
 * 5) does not exist last bundle
 * 6) apply delimiter and internal-delimiter of the default bundle
 * 7) ignore max-count-ends-with


 * Event: current count = max-count
 * 1) Case: amount of repeatable elements > max-count
 * 2) exists last-max-count bundle
 * 3) apply delimiter and internal-delimiter of the last-max-count bundle
 * 4) ignore parameters of the last bundle
 * 5) apply max-count-ends-with
 * 6) does not exist last-max-count bundle
 * 7) apply delimiter and internal-delimiter of the default bundle
 * 8) ignore parameters of the last bundle
 * 9) apply max-count-ends-with
 * 10) Case: amount of repeatable elements = max-count
 * 11) exists last bundle
 * 12) apply delimiter and internal-delimiter of the last bundle
 * 13) ignore parameters of the last-max-count bundle
 * 14) ignore max-count-ends-with
 * 15) does not exist last bundle
 * 16) apply delimiter and internal-delimiter of the default bundle
 * 17) ignore parameters of the last-max-count bundle
 * 18) ignore max-count-ends-with

Old eSciDoc Trac pages

 * Home
 * Citation Style Language