Re: [xml2rfc-dev] <artset> feedback

Julian Reschke <julian.reschke@gmx.de> Fri, 10 May 2019 06:51 UTC

Return-Path: <julian.reschke@gmx.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 668A5120169 for <xml2rfc-dev@ietfa.amsl.com>; Thu, 9 May 2019 23:51:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gmx.net
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 Ytih5vtDjbuH for <xml2rfc-dev@ietfa.amsl.com>; Thu, 9 May 2019 23:51:52 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D15DB12017F for <xml2rfc-dev@ietf.org>; Thu, 9 May 2019 23:51:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1557471093; bh=Ost7WsNe3OjLRDf6WPTP8APdjmjQLZ+hq8VdrDOFv4g=; h=X-UI-Sender-Class:Subject:From:To:References:Date:In-Reply-To; b=N7isQK5Dwmo44m93uf7YLvVi3Mn2GPhP6wvAWFEaIg/1zF4xm6ZYzqJ3k3eV1WRCN FbaqBXhav1blzftnEoBTEBZZZXrLf0Su8brNgZMhnNHfJDynXiDnb4pttzLgvsjT3V wxmPJIXKdeYPj1dZNUYwtsWxFiS6gSBVcLoCIjIc=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.178.124] ([84.171.148.236]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lu8Ri-1ggfyt35SY-011Q3l; Fri, 10 May 2019 08:51:33 +0200
From: Julian Reschke <julian.reschke@gmx.de>
To: Henrik Levkowetz <henrik@levkowetz.com>, XML Developer List <xml2rfc-dev@ietf.org>
References: <eb78385f-9ac0-01e8-8b4a-572d8890c1a1@greenbytes.de> <fe361119-60b1-e269-be2c-de8aa6987db9@levkowetz.com> <d461160c-1a87-999d-3368-2abc797252e6@gmx.de>
Message-ID: <c85f2287-d134-81aa-4c72-81d4a3d82dcf@gmx.de>
Date: Fri, 10 May 2019 08:51:33 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <d461160c-1a87-999d-3368-2abc797252e6@gmx.de>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:s8N7x4dWxvpNn3MH6w3bIlRSlBwxC5ZbjpAarvglbzobsm280+B N7FosTuFYTBCMleyO1uVCb3EtdsRP6pozFTk5e/PORhuQlHN97Iy+Ruy8k8iKiwR27LIrzo tUzlETlnfFx/1jpSlwwUrhmMP9WmAxDyHWHVjMN9qKtAwu7ifJZGrljkAhXLES5agBsL52I 68pRWSHMaG5RID6OzL1Jg==
X-UI-Out-Filterresults: notjunk:1;V03:K0:ORHeS0GMmeA=:bZN/FryAyMErt8NwQwi7bA jOWrfRLFHiWw6LiGhIDvrWCZOHUBMYGKGfx5PbatTx4VrCRtCaak5f6OZul8rnHWQLRSxLcQk CfnD+jYC/7Gcnnw3/U4VvWMYQilQd/MsmVzGJjyZe8PaFx7TK8MSPI7ogwm7qxZt+yQziBvHY tKRa+ugWJfOpcB1LOxJF8DzvJuq1QEgTILosmkkf+mCwgFVgGdswzUzTozDqhsIPmerfjwQZV /jBqGp78R52AZ8KyhOxEVJbrAtO40v9fMjoG/+fZbeqMS5YG0VKfdVv6bg4+XiUKlSyNf8KFc EPCm76ve2uZvV2BCGEo4whfQamzvkgua5Cau9hUciIyhMk71B8fnYOo3qG/MJRB/doz+tZ3dA mYtineYqEuJVqDUaEZMcdGgAwvc8l13+ltBceQgyQjMz/ciB74onfqygwXO9ivao20d5qnG16 nPEIbMeExbvagIlsFqEWwffQd2/vAHvya/Jc8YiQfGIOmR0EFL1kBzy/1yZ9zvthtxXlfEEgD EeJTDUCKYwU/AlfOIab2+y5Ee1jFoKRjGY9XxNxZ63DFm8JIMdIIqfwcxjjZEhk2RRrkstfLh NvwywPCk5yHdZBJEUFU/L8V4q19oo2fEZPvgt9wF3Ch7p605Ufn/lUYcMeRn6KA0zj5Tag7Kf MET6W1Pta+qzBMOkm8xVJxMy/VktJbfE42mFQJgmOdZQ6qE2Zp9Uy/AdGcI0NnF56wFsnYFS3 O8hVU4TSGOO9duwyG0tk1yVA/n6Q48Jrsq+wXc4X8PxauOZCUk7S6jj9nnlfmE/fjXMdOSK6Y hQaUDUslMaplAkwEZUUigFirNCuEqDIPOkKz5EXw9PGeZVAUA3MDZ9K4BfjtnkX/Az0xWRwin oq6gMwRy6JzJqoBpCxIj5i1ql+COL0mUk0lA3MrZrDFXvWsc2tDQ6nsPrzQxvJO6pdK1X1iRk CsjYelM1oiw==
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc-dev/Q-77ePYw-2h6rO3F1iLULjPTOoM>
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: Fri, 10 May 2019 06:51:54 -0000

On 09.05.2019 14:10, Julian Reschke wrote:
> On 09.05.2019 13:57, Henrik Levkowetz wrote:
>> 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?
>
>        artset =
>          element artset {
>            attribute xml:base { text }?,
>            attribute xml:lang { text }?,
>            attribute anchor { xsd:ID }?,
>            attribute pn { xsd:ID }?,
>            artwork+
>          }
>
> (I think)
>
>>> 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.
>
> If we just have "rich" and "text fallback", we can always capture that
> in HTML too (<img alt="..."> etc). It might not be visible by default,
> but it would at least be included.
>
>>> 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.
>
> +1 to always pick the first.
> ...

(if there is a type attribute)

Best regards, Julian