Z3986 Issues Detail
Preserve Whitepace in Block Element
Submitted By: Dave Pawson
Status: Resolved
Issue Type: DTD
Assigned To: DTD Team
Issue Description:
There was a spirited discussion about throwing out the pre element, because it was not semantically rich; it was visual presentation only. We now believe we need something.
does the job only because of established precedence in HTML.
Would <div class="code">code work? Not without processing applications being told what to do.
div xml:space="preserve" is the least semantically clean option with the current vocabulary.
If this does not work, what do we need to do to resolve the problem?
Introduce at least one new element.
Proposal: <programlisting>
A ProgramListing is a verbatim environment for program source or source fragment listings
Formatted as a displayed block. This element is displayed "verbatim" whitespace and linebreaks within this element are significant. ProgramListings are usually displayed in a fixed width font.
Other markup within a ProgramListing is recognized. I'm lost for an element name for the more general case.
This Issue Has Been Resolved as an Errata
Agreed Solution:
extend the %coreattrs entity with the xml:space attribute.
For resolution details go to the Errata page.
