Re: Issues with literate programming DSSSL Script

Subject: Re: Issues with literate programming DSSSL Script
From: MARK.WROTH@xxxxxxxxxxx (Wroth, Mark)
Date: Wed, 22 Dec 1999 08:05:08 -0800
Brandon Ibach <bibach@xxxxxxxxxxxxxx> replied to my discussion (which I have
further trimmed for brevity)
[...]
> 	Unfortunately, I apparently did not specify the problem well enough.
> Some of the contents of the node are SGML markup (specifically pointers to
> other code scraps which are to be inserted in the output code block).  So
an
> example might be 
> 
> <scrap id="scrap1">
> <title>Outside Loop</title>
> While (a < max_a)
> 	<scrapref id="scrap2">
> end
> </scrap>

[...]

BI>    Ok... new problem. :)  The solution I gave, when applied to this
BI> situation, would essentially just ignore the <scrapref>, thus not
BI> including the other scrap properly.

That's what I thought, and the root of my puzzlement with the suggested
solution. 

BI>    Keep in mind that the whole document is, essentially, parsed before
BI> DSSSL processing begins.  So, just because you "skip" a section of the
BI> document in your DSSSL script doesn't mean that it won't get parsed.

And I think I understand that the "bothersome" translations are happening in
the parser, not in the DSSSL engine itself. Generally usually, a very
helpful thing, as it removes all sorts of special cases from the DSSSL code.

BI>    Off the top of my head, the best solution would be to sift through
BI> the children of each scrap, generating a list of data chunks and
BI> nodes, then outputting the data chunks as formatting-instructions, and
BI> processing the nodes with process-node-list, thus allowing the normal
BI> rules to take care of them.  Something like this should work:

[... code section trimmed ...]

Since one of my goals for this project was to increase my understanding of
DSSSL, I'll puzzle over your suggestion for a while ... it wasn't obvious to
me at first reading, a fact I attribute to my ignorance rather than any
fault of the code.

>From a user perspective, it certainly would be nice to not have to "escape"
relatively common symbols.  Failing to properly escape the significant
punctuation (usually an "@") is one of the more common LP processor mistakes
I make, and that's with a punctuation mark that's not real common in the
languages I write.

Since I have a working proof-of-concept "tangle" DSSSL script, I'll post the
existing paper off to Didier; I think it's in something like a "review
draft" state of completeness, and it will be interesting to see what people
have to say about it.


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread