From: Chris W. <Chr...@uw...> - 2010-03-25 17:33:49
|
Yes that's more or less what I had in mind My model in this is Knuths work with Literate Programming. http://en.wikipedia.org/wiki/Literate_programming The longer Wikibook examples attempt to explain the role of the code in an order which makes sense to the reader - which is not the order or level of detail required of the code. Implementations of Knuth's idea start from a single source document, from which both the literary explanation and the code is generated. I'd prefer an approach in which the literary explanation contained references to the XQuery scripts and included the text, suitably formatted for the specified language in the generated HTML So the extensions would be something like: <include lang="xquery" source="/db/Wiki/lib/geo.xqm" function="latlong-2-mercator(,,,)"/> or <include lang="xquery" source="/db/Wiki/geo/map.xg" start="10" end="20"/> or <include lang="xml" source="/db/Wiki/dashboard/config.xml"/> or <include lang="xquery" execute="yes"> ("a","b","c")[last() </include> as well as simple links to execute a URL relative to a document base - this a problem in the Wikibook where all the URLS are absolute BTW I assume the AtomicWiki uses versioning to maintain a version history? Chris ______________________________________ From: Wolfgang Meier [wol...@ex...] Sent: 25 March 2010 16:32 To: Adam Retter Cc: da...@da...; exi...@li...; Henry Neils; Chris Wallace Subject: Re: [Exist-development] First draft of "A Beginners Guide to XRX on eXist" > I suggested that Atomic might be a good solution with a few minor > additions/modifications for his needs. Yes, that's one of the main features of Atomic. But we could also extend our docbook stylesheets to do the same magic: show the source code of an XQuery and at the same time the results of its execution. We would just need to pass the document through an XQuery which expands a certain set of tags before passing the content on to the final stylesheet. This is easy to achieve through a controller pipeline (or xproc, if you prefer). Wolfgang |