[rfc-i] draft-iab-xml2rfc-02 - alignment of sourcecode
tony at att.com (HANSEN, TONY L) Thu, 04 February 2016 04:19 UTC
From: tony at att.com (HANSEN, TONY L)
Date: Thu, 4 Feb 2016 04:19:01 +0000
Subject: [rfc-i] draft-iab-xml2rfc-02 - alignment of sourcecode
In-Reply-To: <3FD398C6-A52F-4742-A819-1413B7D63809@cisco.com>
References: <56ABB36D.6030500@alum.mit.edu>
<6A914091-5ADA-4B52-B622-BF76BCC9E6FA@vpnc.org>
<56B0F23B.20106@alum.mit.edu>
<6A1935EE-73F3-4F93-896B-EC86934E9863@vpnc.org> <56B12AEB.7080902@gmx.de>
<3FD398C6-A52F-4742-A819-1413B7D63809@cisco.com>
Message-ID: <7F501E45-8DBC-4E7A-B4AC-1F483150D5AB@att.com>
The scenarios I came up with for different indentation levels was for *) the case of multiple languages that look better indented differently *) code snippets where an inner block is displayed indented differently than other code snippets One example of the second scenario where that would be useful is for code that you want to eventually be concatenated together after being extracted from the XML. The code would be stored within the XML using the natural indentation level of the code elements, but then the display is adjusted (possible as an outdent) to make it look better. In other words, it?s useful whenever the best extraction indentation for the code segment does not match the best display indentation. Tony Hansen On 2/3/16, 5:47 PM, "rfc-interest on behalf of Joe Hildebrand (jhildebr)" <rfc-interest-bounces at rfc-editor.org on behalf of jhildebr at cisco.com> wrote: >On 2/2/16, 3:17 PM, "rfc-interest on behalf of Julian Reschke" <rfc-interest-bounces at rfc-editor.org on behalf of julian.reschke at gmx.de> wrote: > > > >>It depends on what the formatter does with the indentation information. >> >>In any format other than plain text, it can easily style the actual code >>so that it's clear what's indentation and what's content. >> >>See, for instance: >><http://greenbytes.de/tech/webdav/rfc7230.html#rfc.section.2.1.p.8> > >What I don't understand yet is why you would want to indent different sourcecode elements differently from one another. Without more explanation, your example above looks to me like a perfectly valid approach for all of your sourcecode elements to be styled that way. I see the x:indent-with=" " in the XML source, but I don't see how that affected the HTML, which has <pre class="text">? Can you please walk me through your vision? > >>For once, we want the source code, once a tool extracts it from the XML >>source, to be valid. Right now, this isn't the case for ABNF at least. >>There's also the case where one puts examples into artwork, and leading >>whitespace might distort the example (such as when line length is relevant). > >I completely understand this point. This is an argument for getting the default styling, indentation, etc. correct, not (yet) an argument for why you would need different indentation levels for different <sourcecode>'s. > >For the record, I also don't see a good use case for sourcecode/@align yet (particularly when you can still use artwork/@align). I'm open to change my mind with a single half-useful example, though. > >-- >Joe Hildebrand >_______________________________________________ >rfc-interest mailing list >rfc-interest at rfc-editor.org >https://www.rfc-editor.org/mailman/listinfo/rfc-interest
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Kyzivat
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Hoffman
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Kyzivat
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Julian Reschke
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… HANSEN, TONY L
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Julian Reschke
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Hoffman
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Julian Reschke
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Kyzivat
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Joe Hildebrand jhildebr
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… HANSEN, TONY L
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Kyzivat
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Julian Reschke
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Hoffman
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Hoffman
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Kyzivat
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Joe Hildebrand jhildebr
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… HANSEN, TONY L
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Carsten Bormann
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Hoffman
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Kyzivat
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Martin J. Dürst
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Kyzivat
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Martin J. Dürst
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Joe Hildebrand jhildebr
- [rfc-i] draft-iab-xml2rfc-02 - alignment of sourc… Paul Kyzivat