cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23796] - [PATCH] docs pages containing <source> are sometimes too wide
Date Sat, 08 Nov 2003 22:59:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23796>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23796

[PATCH] docs pages containing <source> are sometimes too wide





------- Additional Comments From conal.tuohy@vuw.ac.nz  2003-11-08 22:59 -------
David, can you point at some examples of author's using <source> in such a way 
that it requires <pre> HTML formatting? I'm curious to see if these are really 
examples of source code, or just tag abuse. The <source> code I looked at 
didn't include such stuff. 

One approach that Nicola suggested was to use <source type="xml"> etc or 
<source type="java"> and this may help. The templates I posted were really 
suited to type="xml", and with a bit of a twiddle would also suit type="java" 
(currently they don't handle //-style comments).

Maybe we could move forward more quickly by adding the templates with:

<xsl:template match="source[@type='xml']">

or even:

<xsl:template match="source[starts-with(normalize-space(),'&lt;') and substring
(normalize-space(),string-length(normalize-space()))='&gt'">

etc.

Vadim, I think your low-tech suggestion mixes concerns. Optimum line-lengths 
are a function of the output device (paper size, paper margins, screen 
resolution, browser font size, etc). For a given line of <source>, on some 
devices line wrapping may be necessary, but on other devices not. So it's not 
really appropriate to hard-code these decisions on an individual basis in the 
xdocs.

Mime
View raw message