Re: [xml2rfc-dev] <artset> feedback

Henrik Levkowetz <henrik@levkowetz.com> Thu, 09 May 2019 11:57 UTC

Return-Path: <henrik@levkowetz.com>
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 72606120020 for <xml2rfc-dev@ietfa.amsl.com>; Thu, 9 May 2019 04:57:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 pKjxnJahoY7A for <xml2rfc-dev@ietfa.amsl.com>; Thu, 9 May 2019 04:57:56 -0700 (PDT)
Received: from zinfandel.tools.ietf.org (zinfandel.tools.ietf.org [IPv6:2001:1890:126c::1:2a]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4CDFE120006 for <xml2rfc-dev@ietf.org>; Thu, 9 May 2019 04:57:56 -0700 (PDT)
Received: from h-202-242.a357.priv.bahnhof.se ([158.174.202.242]:57702 helo=tannat.localdomain) by zinfandel.tools.ietf.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <henrik@levkowetz.com>) id 1hOhgQ-0004wr-Um; Thu, 09 May 2019 04:57:55 -0700
To: Julian Reschke <julian.reschke@greenbytes.de>, XML Developer List <xml2rfc-dev@ietf.org>
References: <eb78385f-9ac0-01e8-8b4a-572d8890c1a1@greenbytes.de>
From: Henrik Levkowetz <henrik@levkowetz.com>
Message-ID: <fe361119-60b1-e269-be2c-de8aa6987db9@levkowetz.com>
Date: Thu, 09 May 2019 13:57:47 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <eb78385f-9ac0-01e8-8b4a-572d8890c1a1@greenbytes.de>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="8oiJWOGsDKEMxguHVPQJpAtPqE6i09n6T"
X-SA-Exim-Connect-IP: 158.174.202.242
X-SA-Exim-Rcpt-To: xml2rfc-dev@ietf.org, julian.reschke@greenbytes.de
X-SA-Exim-Mail-From: henrik@levkowetz.com
X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000)
X-SA-Exim-Scanned: Yes (on zinfandel.tools.ietf.org)
X-Clacks-Overhead: GNU Terry Pratchett
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc-dev/0h6GKeUVOkdTSFA56bnoynt81lA>
Subject: Re: [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:57:59 -0000

Hi Julian,

On 2019-05-09 13:24, Julian Reschke wrote:
> 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-

Good point.  What would be your proposed grammar change to address this?

> 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.

Ok.

> 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.

I don't see this -- the essential problem is the same whether the number
of alternatives are 2 or more than 2.  And that is built into the idea
that the XML should be able to provide richer content for HTML than for
text; I don't see any way around this.

> 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.

The serious fussiness here comes from 

  1) not prescribing whether the first or some other <artwork> should be
     chosen when there are multiple instances with the same type.
     For this, I propose that we codify that the first is always chosen,
     or alternatively, make it an error to have more than one of each type.

  2) having implementation-specific preference lists.  We could codify this
     more strictly too.  Would the xml2rfc settings work for you here?

> 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).

We've had this discussion before, and disagree.  I maintain that an explicit
type is better than an implicit type.  An implicit type leads to _huge_
difficulties in specifying exactly how the inspection is done and how
the result is interpreted.

> 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.

And that's the issue that is inherent also in the RFC 7991 schema, since it
permits 2 different artworks, only one of which will be shown in the
rendered form.  Nothing new here.  I'm fine with discussing the issue, but
don't make it out as something introduced with <artset>.


Regards,

	Henrik