Home | Public Area

Comment #00273 - Add a new element <code> - z39.96-2012.pdf

Comment 273
Addressed (Unresolved)
ANSI/NISO Z39.96-2012, JATS: Journal Article Tag Suite (version 1.0) (Revision 0)
Comment Submitted by
Debbie Lapeyre
2013-06-10 13:59:41
We request that NISO JATS add a <code> element. The <preformat> element is becoming semantically overloaded and does not quite meet our needs.


In current ANSI/NISO JATS, the <preformat> element is used to hold program code and scripts, pseudo-code, man-machine dialogs, error codes and messages, ASCII art, shape poetry, in fact any text that needs spacing preserved.
It is frequently abused for small bits of text that might more properly be taggedas an array. It can contain almost anything.

We currently use <preformat @preformat-type="code"> to handle our computer language samples. But we would prefer to have an explicit <code> element.

<preformat> is oriented towards display, with the following attributes:
- id (unique identifier)
- orientation (portrait or landscape for displays
that care, such as print)
- position (floating or fixed in the display)
- preformat-type (type such as "code" or "poetry")
- specific-use (why or how used)
- xml:lang (what human language)
- xml:space (keep tabs and spaces)

In addition to predeclaring the semantics, we would like <code> to have at least the following additional attributes:

- code-type
- code-version
- executable (yes | no)
- language (meaning computer language such as JAVAScript)
- language-version (of the computer language)
- platforms (on which platforms do you intend this to run)
- code-version

The usage we envision is an alternatives grouping containing 3 executables (for various platforms), an ASCII version for simple display, and a syntax-colored version (by one of the popular syntax-coloring programs) for fancy display.

* * *
Submitter Proposed Solution
See comment.
Jeffrey Beck
2013-11-27 11:16:56

Thank you for your comment. The JATS Standing Committe has addressed your request. Non-normative supporting materials including schemas with these additions in place should be available soon.

The Standing Committee's recommendation is:

• Element <code> will be added to the Tag Suite

• The element <code> will be allowed inside the element <alternatives>.

• The element <inline-code> will not be added to the Suite.

• The definition, related elements, and attributes for this new block element were accepted as proposed.