/ "M. Wroth" <[EMAIL PROTECTED]> was heard to say:
| The project is, BTW, a literate programming extension to DocBook, and
| this is part of getting the "tangle" (code output) branch to work. So
Interesting. Have you considered using XSLT instead of DSSSL? I believe
that you'd get the "right" answer if your "tangle" transformation used
the "text" output method.
I considered it, and chose to go with DSSSL for several reasons:
- The "weave" branch needs to go to printed output, and I haven't figured out a good way to do that
- I want the solution to work with both SGML and XML based documents, rather than just XML
- I know DSSSL (more or less) and would have to learn XSLT (this may be the biggest reason :-)
In DSSSL, I'd be tempted to examine each character in the output and
do the right thing without the <literalchar> hack. It'd be slower,
probably, but so much cleaner :-)
That would require more DSSSL expertise than I have, I think. But the main objection I have is that the code text can contain markup -- xref at a minimum, but potentially all of the markup currently in programlisting plus some additional markup aimed at "prettyprinting" the code, and entity references (taking the place of macros in some senses). So doing the "right thing" is pretty close to parsing general SGML. It's easier to define a few entities and use them in appropriate places in the code, I think (although if I wind up using this for SGML code, I may change my mind :-).
<[EMAIL PROTECTED]>
