[xml2rfc-dev] <artset> feedback

Julian Reschke <julian.reschke@greenbytes.de> Thu, 09 May 2019 11:25 UTC

Return-Path: <julian.reschke@greenbytes.de>
X-Original-To: xml2rfc-dev@ietfa.amsl.com
Delivered-To: xml2rfc-dev@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6B7AF12010D for <xml2rfc-dev@ietfa.amsl.com>; Thu, 9 May 2019 04:25:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de header.b=LBzKuAJ1; dkim=pass (1024-bit key) header.d=greenbytes.de header.b=LBzKuAJ1
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id is8pjreRYEV1 for <xml2rfc-dev@ietfa.amsl.com>; Thu, 9 May 2019 04:25:03 -0700 (PDT)
Received: from mail.greenbytes.de (mail.greenbytes.de [217.91.35.233]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 05FFC120108 for <xml2rfc-dev@ietf.org>; Thu, 9 May 2019 04:25:02 -0700 (PDT)
Received: by mail.greenbytes.de (Postfix, from userid 117) id E0CF315A0CD6; Thu, 9 May 2019 13:25:00 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greenbytes.de; s=mail; t=1557401100; bh=TSjVcgArzCLGLDIGBUstlkva5c4t4Gw+DgxsfXuiMcg=; h=To:From:Subject:Date:From; b=LBzKuAJ1QbIgo2VxAFhmChy2adp4ZvwKskx0CizCOJhQkUXfWIAYkal0ASSlBATwb nNwfUxOW460g330axw4fcv50oSyEjoZ7fDbBIlw4rYr//bWGL5sfCOuPELQPkNQ8En gWzrUVvarSAhdrlOdZOwii6lIvqfDXE0hm1UEIRM=
Received: from [192.168.178.124] (unknown [84.171.144.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id F40D515A0526 for <xml2rfc-dev@ietf.org>; Thu, 9 May 2019 13:24:59 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greenbytes.de; s=mail; t=1557401100; bh=TSjVcgArzCLGLDIGBUstlkva5c4t4Gw+DgxsfXuiMcg=; h=To:From:Subject:Date:From; b=LBzKuAJ1QbIgo2VxAFhmChy2adp4ZvwKskx0CizCOJhQkUXfWIAYkal0ASSlBATwb nNwfUxOW460g330axw4fcv50oSyEjoZ7fDbBIlw4rYr//bWGL5sfCOuPELQPkNQ8En gWzrUVvarSAhdrlOdZOwii6lIvqfDXE0hm1UEIRM=
To: XML Developer List <xml2rfc-dev@ietf.org>
From: Julian Reschke <julian.reschke@greenbytes.de>
Message-ID: <eb78385f-9ac0-01e8-8b4a-572d8890c1a1@greenbytes.de>
Date: Thu, 09 May 2019 13:24:59 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc-dev/Qk648sfYm63j2FDNIJ0kAQ9xPnQ>
Subject: [xml2rfc-dev] <artset> feedback
X-BeenThere: xml2rfc-dev@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion about particulars of xml2rfc V3 design, development and code." <xml2rfc-dev.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xml2rfc-dev>, <mailto:xml2rfc-dev-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xml2rfc-dev/>
List-Post: <mailto:xml2rfc-dev@ietf.org>
List-Help: <mailto:xml2rfc-dev-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xml2rfc-dev>, <mailto:xml2rfc-dev-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 09 May 2019 11:25:05 -0000

Hi there,

see below for some feedback on <artset>, as currently described in 
<https://tools.ietf.org/html/draft-levkowetz-xml2rfc-v3-implementation-notes-08#section-3.1.1>.

I have worked on an implementation in rfc2629.xslt (which should be 
fairly complete), and have my own set of tests at 
<https://greenbytes.de/tech/webdav/rfc2629xslt/v3test.xml#artset>. So 
please read this as implementer's *practical* feedback.

In general I found this change to be very disruptive, because it affects 
all code that deals with <artwork>, and everything related to it 
(numbering, references, etc). A simpler approach (as proposed back then) 
IMHO would be far better.

That said, here are the details:


1) The grammar allows <artset> to be empty

This makes things really hard. How is an empty <artset> element expected 
to be handled? Does it contribute to the counting of paragraphs? Can it 
be target of an <xref>? These things of course could be defined, but it 
would be much simpler to require at least one <artwork> child element-


2) anchor propagation and <xref>

"The first anchor on an <artwork> element within an <artset> element 
will be promoted to the <artset> element if it has none; apart from 
that, anchors on <artwork> elements within an <artset> element will be 
removed by the preptool."

I understand that this is supposed to make the author's life easier - an 
existing <artwork> element can be moved into a new <artset> container 
without modification.

However, it causes lots of edge cases, such as: what happens if I <xref> 
an <artwork> element that does not appear in the rendered output? I 
*assume* the intention is to say that the anchor propagation applies (1) 
not only at the preptool stage, and (2) applies *both* to the <artwork> 
elements and all <xref>s referencing them - but the spec would need to 
say way more about that.


3) Invisible content

Having multiple <artwork> alternatives can lead to content being present 
in the canonical XML, but not to appear in the rendered output. I can 
see that this is a problem with textual fallback content already, but 
allowing any number of altenative <artwork> elements in the canonical 
XML makes this a much more serious problem.


4) Processing model

"This would let the renderer pick the most appropriate <artwork> 
instance for its format from the alternatives present within an <artset> 
element, based on the "type" attribute of each enclosed <artwork> 
element.If more than one <artwork> element is found within an <artset> 
element, with the same "type" attribute, the renderer could select the 
first one, or possibly choose between the alternative instances based on 
the output format and some quality of the alternative instances that 
made one more suitable than the other for that particular format, such 
as size, aspect ratio, or whatnot."

"Implementation:  Xml2rfc as of version 2.19.0 implements this, with a 
preference list when rendering to HTML and PDF of ( "svg", "binary-art", 
"ascii-art" ), while the text renderer uses the list
       ( "ascii-art", ) -- i.e., one entry only."

So there is no precise processing model, due to the fact that we can't 
predict what kind of alternative formats will come up. The description 
of the *actual* model is specific to a certain version of one 
implementation.

In addition, this depends on the "type" attribute which as per RFC 7991 
is sort of advisory only (see 
<https://greenbytes.de/tech/webdav/rfc7991.html#element.artwork.attribute.type>).

I believe it would be better (and more author friendly) to actually 
inspect the contents of the <artwork>, and decide based on that (that's 
what I'm currently doing in rfc2629.xslt).


I have spent a significant amount of time to implement this, but I'd 
still prefer to throw this all away and make a less-intrusive extension 
instead.

That being said, point 3) above really needs to be discussed in the 
context of how the canonical form and the default rendering relate to 
each other.

Best regards, Julian