Reece Dunn wrote: > > > ? Do I have any alternatives other than copy-paste? > > Including XML files is easy using the XSL:T-based document() function. I am > not sure on plain-text files (unless this is now supported in XSL:T > 2.0/xsltproc).
Neither do I :-( > >has a couple of problems: > > > >1. The code, which I've copy-pasted and wrapped in programlisting, is not > >highlighted, even though class reference uses highlighting. How hard would > >it > >be to enable highlighting for the programlisting elements? > > Do you want me to have a go at this? I have a few ideas that I could try. I > am not promising anything, though, because I don't know how performance > will be affected. Sure! I'd be gratefull for any help. > The problem is that you can't do this using standard regex/text processing > techniques. However, it is possible to do. I have some XSL:T code that I > could modify that converts an XML dsocument into a list of words, doing > normalization on them (punctuation removal and conversion to lower case). Since there's some existing code for that, maybe you could hijack that? > There are a few problems affecting what you can do: > 1. XSL:T is a recursive/tree-based programming language, so token > processing is more complicated > 2. The resulting engine will be performance-intensive in both space and > time complexity Yea, that could be a problem. Generating docs for my not-so-large library already takes quite some time. > There are, as I see it, two possibilities: > 1. Preprocess the cpp files into XML highlighted markup. This would require > a C++ program or (perl?) script to do the conversion. These can then be > added into the jam file. What would you expect from a Boost.Build developer? ;-) I think this approach is quite reasonable. > 2. XSL:T based processing. For this approach, I would add a new element, > e.g. <highlight>: > > inlined source code (e.g. examples, copy/paste): > <highlight lang = "c++">...</highlight> > > from a file: > <highlight lang = "c++" src = "..."/> > > I have the lang attribute here to allow for the possibility of supporting > additional languages, e.g. xml, Haskell, perl, etc. > > Thoughts? Ideas? Comments? Basically, I think that I existing code can be easily reused, or a new one can be written without much troubles, and performance problems, that's fine. If not, we'll have to use separate tool. BTW, how can I specify highlighting in docbook, as you suggest for this approach? Does programlisting allows to "color" elements to be put inside? > >2. Right at the bottom of the page, the are results of rendering the > ><screen> > >element. The problem is that it's not as nice as the programlisting. Is > >there > >anything which can be done. Like using the same class as for > >programlisting? > > This is not a problem. Just look for '.programlisting' in the CSS file and > add ', .screen' - that simple :). That was simple, and now docs look much nicer. Thanks, Volodya ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Boost-docs mailing list [EMAIL PROTECTED] Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs
