[rfc-i] How "modern" word processors do it

Joe Hildebrand jhildebr at cisco.com
Sun May 27 00:20:09 PDT 2012


On 5/26/12 11:32 PM, "Joe Touch" <touch at isi.edu> wrote:


> If you feed it into a compiler, it won't work. There are VERY few examples of
> code in RFCs that is complete enough to compile (I provided one in RFC1810,
> but most are code fragments at best).

Did you look at draft-ietf-codec-opus?

Another data point, http://trustee.ietf.org/24.html says:

<blockquote>
It is common to use extracts from RFCs that are in
the form of computer code by incorporating them
in software. This is the only usage formally allowed
by the current IETF rules (RFC 3978).
</blockquote>

"common"

>>> I just grabbed part of two different containers. That can be useful for
>>> context. Why prevent it?
>> 
>> There's nothing that prevents it. For example, you could use the comma
>> operator in CSS (http://www.w3.org/TR/CSS1/#grouping) to select out the
>> pieces you want and stitch them together.
> 
> How does that reference have anything to do with selecting portions of two
> different containers?

This is turning into a seminar on CSS.

The comma operator matches both selectors on either side of the comma.
Think union.

For an example of how you would use this to actually retrieve the pieces you
want, jQuery (http://jquery.com/) provides an easy way to select HTML
fragments using CSS, plus some extensions.

You would select the various portions that you wanted using individual CSS
selectors, then glue them together with a comma.

This is just if you wanted to process the text programmatically.  If you
just wanted to do this as an end-user, of course you could drag your mouse
over the portion that you wanted in your browser, and select copy.
Containment has no bearing on that function.  The source browser will put
HTML into the clipboard that more-or-less looks like what you started with.
If you want it to be more exact, you view-source, then copy/paste.

> I've already shown how cut/paste of them into another doc destroys the overall
> XML structure where it won't compile without manual intervention.

I'm not talking about hand editing, which is likely the only place where the
XML structure gets mangled.  I'm talking about programmatic access to
information, typically a section at a time.

-- 
Joe Hildebrand



More information about the rfc-interest mailing list