Hans Hagen wrote:
Nikolai Weibull wrote:
Is there (going to be) any support for this export format in ConTeXt so that I can just generate this kind of XML instead so that we only do things once? I found this in mscite-p.pdf: “The exporter will be descibed as soon as there are styles for processing the XML code. For the moment we stick to showing the schema.” Am I to take it that there are plans for handling this, but that nothing has been written yet? I’ll gladly help out if I can. I was hoping to make an article out of this, but now it seems that a lot of groundwork has already been done. (I really need to write some articles if I’m going to be accepted for a postgraduate position.)
see attached zip
this is what is produced, writing an xml mapping to context code (i must have an example somewhere but cannot find it now)
(I come off quite negative in this response, but I am not trying to
place blame here, just trying to come up with something better.)
That’s just horrendous. The ‘n’ attribute on ‘line’ is useless (and why
are empty lines unnumbered?). You can just as easily use XSLT’s
<number/> to get that effect:
about an article ... it would be interesting to combine thsi with a kind of literate programming
Yes, that’s true. I used a simple hack to my code written in literate programming into my master’s thesis. It worked quite well actually. I’m sure that this could be combined with the method I used there.
(if cweb would produce better output then it may have become a bit more popular)
Yes. I see three problems with CWEB: 1. The syntax is too complicated 2. The output is not great 3. The input isn’t compilable in the source programming language What my literate programming system did was allow for embedding comments in the source instead of the other way around (much like how ConTeXt sources are documented). This worked very well actually, especially in the parts of my code that were written in Ruby where one can do things like # ¶ OK, so now that we have all the other methods done, it’s time to # write our final method \Ruby{method}. It will simply tie together the # other methods found in \Ruby{Class}: def Class.method ⋮ end (A sequence of comments where the first comment began with a pilcrow sign are processed as stuff to send to ConTeXt and the following code block (basically everything up to the next pilcrow-endowned comment) was set inside a verbatim environment.) Anyway, I’ve attached the Relax-NG schema that I deviced. Tomorrow I’m going to work on writing an exporter that exports to this format and a stylesheet that transforms this to ConTeXt code. If I have time I’ll also try to set up some environment for this and some generic preprocessing directives for texexec. nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}