[rfc-i] draft-iab-xml2rfc-02 - alignment of sourcecode
Joe Hildebrand (jhildebr)
jhildebr at cisco.com
Wed Feb 3 14:47:53 PST 2016
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:
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.
More information about the rfc-interest