Proposal to regulate markup in CIF files

Bollinger, John C John.Bollinger at STJUDE.ORG
Wed Sep 13 16:08:42 BST 2017


Dear Colleagues,

I think the proposed approach of allowing markup convention to be specified in data files could be useful.  Moreover, the proposal would provide a mechanism for formalizing the specification of which items are subject to markup in the first place.  Supposedly, that is determined by items’ definitions, but in practice, few, if any, current dictionaries or definitions actually address the topic explicitly.

Considerations:

1. To the extent that the proposal envisions data files being enabled to self-specify a particular markup convention from among several choices, it seems to violate the principle that the meaning of an item should not depend on the value of a different item.

2. Since the codes for various supported markup conventions would be defined in domain dictionaries, it seems we might be setting ourselves up for future issues in the event that dictionary maintainers want to support new markup conventions, for then we will need to change existing definitions (which, granted, we have lately afforded ourselves some freedom to do).

3. Additionally, the proposal seems to imply that each domain dictionary would need to either specify its own analogue(s) of `_publ.markup_convention`, or else to explicitly depend on the Core item.  I am uncertain whether this is a good or bad thing.

4. The proposal does not preclude individual items from being defined to have whatever content type is desired for them, as long as the definitions are not flagged as carrying `Marked-up` data.  That’s good, but I can imagine hypothetical cases in which it would be confusing to dictionary authors.  For example, if an item were defined to contain HTML markup, it would be necessary for its definition to specify that its values were NOT `Marked-up`.

5. Although we call the existing CIF conventions “markup” – and that’s fitting – for the most part they don’t serve the same purpose as Markdown, reStructured text, etc..  Almost all of our markup is aimed at encoding specific characters, whereas the other markup conventions mentioned are focused on document structure and styling.  These are largely orthogonal considerations, so perhaps we should approach them separately.

6. The discussion accompanying the proposal distinguishes between items that are intended to be machine-actionable and those intended purely for human consumption, with the assertion that only the latter kind should be subject to markup.  I would accept that if it referred to structural markup only, but it is not so clear that such a rule is appropriate for markup that serves to encode characters.  Consider, for example, `_atom_site.label`.  As a key data name, it certainly has machine significance, but its values are also meant to identify atoms to humans.  Should CIFs, then, be forbidden from using `Cα` (i.e. `C\a`) as or in atom labels?  Forbidding use of markup would prevent literal `Cα` from being expressed in an atom label in a CIF 1.1 document, but not in a CIF 2.0 document, so that sets up a pathway wherein markup gets introduced into data values through format transliteration from CIF2 to CIF1.  If only the original document were considered valid in such cases, then that would constitute a rather nasty trap to set for ourselves.


Initial analysis:

As presented, the proposal’s largest impact would probably be to provide for DDLm dictionaries to specify which items are primarily (or exclusively) intended for human consumption: those that are defined to have `Marked-up` content, regardless of whether any markup is actually present in their values.  Initially, at least, this would establish in which values to interpret the standard CIF markup conventions.  That would be worthwhile.

I am less certain about the prospects for or usefulness of enabling data files to select alternative markup conventions.  Perhaps that could be used to good effect to support revisions to the markup conventions.  Perhaps it would be more broadly applicable.  But perhaps we should avoid making any items’ meanings depend on other items’ values.

John


From: comcifs [mailto:comcifs-bounces at iucr.org] On Behalf Of James Hester
Sent: Tuesday, September 12, 2017 11:17 PM
To: Discussion list of the IUCr Committee for the Maintenance of the CIF Standard (COMCIFS) <comcifs at iucr.org>
Subject: Proposal to regulate markup in CIF files

Dear COMCIFS
Please see below a draft proposal for dealing with markup in CIF files. Let me know if you agree with the general approach, or suggest better alternatives.  Once our general direction is agreed, our COMCIFS subcommittees will go into a huddle and sort out the definitions.
James.

===============


Proposal for regulating markup of CIF text items
================================================

Summary
=======

Data names whose values can be marked-up are given a new type.  In
consultation with heavy users of markup, a limited set of markup
systems (ideally just one) is documented in the CIF core dictionary.

Introduction
============

From the very first publication describing CIF, markup conventions
have been provided in order to extend the range of characters and font
effects representable in ASCII.  Which data values these conventions
might apply to, and whether or not this is more properly a CIF syntax
or dictionary (semantic) issue, has been left implicit.

Marked-up text according to the ad-hoc definitions described in Vol G
appears both in CIF data files and in dictionary definitions. While
COMCIFS has control over the conventions applying within dictionaries,
it has far less control over data values in data files, which are
produced both by dedicated software, such as publCIF, and hand-editing
or local ad-hoc solutions.  Marked-up text in data files plays an
important role in the publication workflow.

Vol G (First Edition) notes in section 2.2.5.3<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2F2.2.5.3&data=01%7C01%7CJohn.Bollinger%40stjude.org%7Cd89e242461fc4cca53ce08d4fa5e51b9%7C22340fa892264871b677d3b3e377af72%7C0&sdata=K9d03n5YyLsgkcG6xvFJDTSmxV8kRMtapDUqWc4yDMg%3D&reserved=0>: "It is hoped that in
future different types of such markup may be permitted so long as the
data values affected can be tagged with an indication of their content
type that allows the appropriate content handlers to be invoked". This
document attempts to clean up this outstanding piece of CIF
housekeeping, in part by rejecting the premise that multiple markup
approaches are desirable.

Syntax or semantics
===================

The markup conventions have traditionally been presented together with
the CIF syntax standard, as a "common semantic feature". However, upon
consideration of CIF-JSON and CIF embedded in HDF5, it is clear that
the syntax itself does not determine how a particular text string
should be marked up: a text string transferred to either of those
formats remains identical, with identical meaning as defined in the
appropriate dictionary; there is no reason that markup should be any
different.

Therefore, markup conventions should be described either in the
relevant DDLm dictionary or in the DDLm attribute definitions. Use of
the DDLm attribute dictionary to define markup conventions is too
rigid, as DDLm could, in principle, be used in a context completely
divorced from crystallography that may well have its own preferred
markup.  This leaves the dictionary as the appropriate place to define
the markup convention.

I propose we proceed as follows:

(1) We add a new enumerated value to `_type.contents`
    e.g. 'Marked-up'. Data names with this type may be marked up.
(2) We add a new data name to the core dictionary
    e.g. `_publ.markup_convention`. The markup convention indicated by
    this data name applies to all data values of type 'Marked-up'.
(3) We provide the `_publ.markup_convention` data name with one or
    more enumerated values each corresponding to a particular markup
    convention that may be in operation in a data block
(4) We aim to restrict markup options to a single (default) value
    corresponding to the current markup system. Any expansion or
    alteration should be carried out in consultation with heavy users
    of the markup.

Comments
========

1. It is generally undesirable to allow multiple markup
   systems. Publication workflows are generally complex, and having to
   support multiple source text forms would place an undue and
   unnecessary burden on heavy users of CIF text markup like the IUCr
   journals.  The presence of a dedicated data name does, however,
   allow proponents of alternative markup conventions to make their
   case.

2. Markup is purely for human consumption. In particular, enumerated
   values must be excluded, and no machine-actionable content should
   be encoded in marked-up text.

3. With the agreement of heavy consumers of CIF marked-up text, we may
   explore expanding the scope of the current convention to include
   elements such as footnotes.

4. Since 1993, when the lightweight CIF markup was proposed, a number
   of lightweight ASCII text markup systems have been developed. These
   include reStructured text, Markdown and ASCIIDoc. While it might be
   worthwhile transitioning to one of these in order to use the more
   comprehensive formatting that would be available, the backslash
   notation currently used is likely to cause conflict.


--
T +61 (02) 9717 9907
F +61 (02) 9717 3145
M +61 (04) 0249 4148

________________________________

Email Disclaimer: www.stjude.org/emaildisclaimer
Consultation Disclaimer: www.stjude.org/consultationdisclaimer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iucr.org/pipermail/comcifs/attachments/20170913/cf777458/attachment-0001.html>


More information about the comcifs mailing list