RE: [jats-list] <code> and @language documentation (1.1d1)

Subject: RE: [jats-list] <code> and @language documentation (1.1d1)
From: "Maloney, Christopher (NIH/NLM/NCBI) [C]" <maloneyc@xxxxxxxxxxxxxxxx>
Date: Fri, 28 Feb 2014 21:51:14 +0000
I would suggest removing @code-type.  

As it stands now, as Alf mentioned,
it's not clear what the distinction between these two attributes is supposed
to be, and I think that any attempt to maintain separate concepts for
something like serialization format (e.g. xml) vs. language (e.g. xslt) is
doomed to result in ambiguous usage.

In the interest of keeping simple things
simple, a someone should just be able to tag this with, for example,
`language='xml'`.  

If you really want to suggest how to do more fine-grained
specification, one idea would be to refer to something like how IANA defines
XML media types[1][2].  For example, one could use the value "xslt+xml".   I'm
not crazy about this idea, but thought I'd throw it out, as a possible
alternative to having two attributes.	

[1]
https://tools.ietf.org/html/rfc3023
[2]
http://www.iana.org/assignments/media-types/media-types.xhtml#application
________________________________________
From: Alf Eaton [eaton.alf@xxxxxxxxx]
Sent: Friday, February 28, 2014 3:49 PM
To: jats-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [jats-list] <code> and @language documentation (1.1d1)

On 28
February 2014 20:13, Debbie Lapeyre <dalapeyre@xxxxxxxxxxxxxxxx> wrote:
> On
Feb 28, 2014, at 6:34 AM, Alf Eaton <eaton.alf@xxxxxxxxx> wrote:
>
>> I was
looking at the documentation for the new <code> element[1], in
>> preparation
for making use of it, and noticed a couple of oddities:
>>
>> Firstly, it
seems that the @language attribute is intended for
>> conveying the language
that the code is written in, but in the
>> examples, @code-type is used
instead of @language. I would like to
>> suggest that the example is changed
to use @language:
>>
>> <code language="xml" 
>> rather than
>> <code
code-type="xml" 
>
>
> Interestingly, we had this argument inside Mulberry
too.
> For myself, I am old-fashioned and maintain that "XML" is NOT
> a
programming language.

XML may not be a programming language, but it is a
markup language, so
I think "language" still makes sense here. The language
attribute also
maps directly to HTML's recommendation of class="language-*" on
a code
element[1] to denote the language of the code that's included. This is
used to tell syntax highlighters what to expect (which is the use case
that
I'm working on here), when the HTML is rendered. If the code is
XSLT, then the
class would be "language-xslt", and there wouldn't be
any need for an extra
attribute to say that it's also XML, as that
would be implicit.

Alf

[1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semant
ics.html#the-code-element
--~------------------------------------------------------------------
JATS-List info and archive:  http://www.mulberrytech.com/JATS/JATS-List/
To
unsubscribe, go to: http://lists.mulberrytech.com/jats-list/
or e-mail:
<mailto:jats-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--~--

Current Thread