lyx2rfc doesn't know what to do with code listings and leaves CDATA where it's not expected, which causes xml2rfc to error out. The solution is to teach the LyXHTML->XML XSL to convert <dic class="code"> to figures with code in the figures.