Re: stylesheets for stylesheets (was Re: Swapping table rows and columns)

Subject: Re: stylesheets for stylesheets (was Re: Swapping table rows and columns)
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Jul 1999 07:45:03 -0700
At 99/07/07 19:15 +0800, James Tauber wrote:
>Me too. I've been thinking about XSL-based literate programming on and off
>for the last year or so. 
...
>I'm not aware of any effort to use XSL for literate programming, although,
>as Ken has pointed out, he has used DSSSL.

When I've thought about doing something similar for XSL than what I've done
for DSSSL, recognizing that I don't have architectural forms, the following
points have made up a wish list of features for XSL (unfortunately, since
the last working draft is supposed to be "feature complete" I've resisted
the temptation to formally submit these as suggestions;  I had submitted
two other suggestions for a "future wish list" and they were misinterpreted
as requests for the current version).

What I'd like to see (any one of the following, ordered in increasing
flexibility):

  (1) - any non-XSL namespace construct at the top level (child of
<xsl:stylesheet>) to be ignored without an error
      - I could add documentation between template rules:

        <para>The following template will ....</para>
        <xsl:template match="thing">
           ......

  (2) - a specific "no-operation" XSL instruction within which I could
build my documentation constructs as children (the engine does nothing with
<xsl:no-op> or its children):
        <xsl:template match="thing">
          .....
          <xsl:no-op>
             <para>The following decision will decide ....</para>
          </xsl:no-op>

  (3) - a specific "no-operation" namespace URI allowing me to intersperse
my own documentation constructs either using the no-op prefix or as a child
of a no-op prefixed construct
      - allows documentation between template rules of my own design: 
      - allows documentation anywhere inside any template
      - the engine just ignores any construct in the no-op namespace,
nothing interferes with the growth of the result tree:

        <xsl:template match="thing">
          .....
          <no-op:para>The following decision will decide ....
          </no-op:para>
       

Once I can get ignored constructs in my stylesheet, I would then build a
set of documentation similar to what I have: paragraphs, emphasis, external
links, defined constructs, etc.

To process the literate stylesheet for documentation purposes, I could
produce HTML or PDF, yet the file is untouched as an XSL stylesheet.

Not as elegant as built-in architectural form recognition, but I'd get the
pretty documentation I'd like to have.

................. Ken

--
G. Ken Holman                    mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999   (Fax:-0995)
Website:  XSL/XML/DSSSL/SGML services, training, libraries, products.
Publications:   Introduction to XSLT (3rd Edition) ISBN 1-894049-00-4
Next instructor-led training:   MS'99 1999-08-16  MT'99 1999-12-05/06


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread