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 Mon, 15 Dec 2003 20:12:22 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-12-15 20:12 -------
Sorry I trashed my example setup by installing a Slide WebDAV server in the 
ROOT context :-) d'oh! I've fixed it now so you can see my syntax highlighting 
solution. e.g. 
http://203.79.120.217/cocoon212/docs/snippet/snippet-internal-pipeline.html

I'm currently refactoring it into separate pipeline stages, and to allow for 
the parser to handle multiple types of source (I'm going to add Java syntax 
highlighting).

The transformation stages are:

1) recognise ("sniff") the type of <source> elements and add a @type attribute.
2) parse the source into areas of different highlighting, using a grammar 
appropriate to the type of source.
3) render the highlighted areas in HTML (or XSL-FO)

I think syntax highlighting is a great thing in itself, but it also has a 
relevance for line-wrapping: there are some parts of the code which are better 
to wrap than others. For instance, in "markup" source (i.e. XML or HTML), the 
whitespace inside of the tags (between attributes) can always be wrapped. 
Whitespace inside attribute values should definitely not be. In Java we should 
also avoid wrapping whitespace inside string literals and //-style comments, 
but otherwise line wrapping doesn't matter at all.

Mime
View raw message