Re: XSL to create positional ASCII text layout

Subject: Re: XSL to create positional ASCII text layout
From: Steve Tinney <stinney@xxxxxxxxxxxxx>
Date: Thu, 23 Dec 1999 12:07:48 -0500
It is perfectly feasible to create XSL outputs which not only 
do not add a single additional space, but which also strip 
various kinds of space from the output.

The key techniques are:

      1) use xsl:strip-space to kill whitespace on input
      2) use normalize-space() to kill leading and trailing
         whitespace from text elements, as well as reduce
         interior multiple spaces to a single space
      3) use xsl:text to do output rather than putting the
         bare literals in the XSL stylesheet
      4) (probably unnecessary if you do all of the above
          fastidiously) format the XSL stylesheet to put
         code-prettying whitespace inside the tags, e.g.,
           <xsl:apply-templates select="something/long"
           />

 Steve

Jeff Hamilton wrote:
> 
> I would like to use XSL to create plain ASCII text reports
> using XML as a data source.  The major requirement is
> to be able to place a field in a specific spot on the page,
> say "row 6, column 10".
> 
> I created an XSL stylesheet that partially worked, however
> the whitespace in the XSL was semantic.  This resulted in
> some very messy XSL.
> 
> Can what I want to do be done with just transformations?  Or
> should I be thinking about modelling my reports with
> XSL formatting instructions and building ( or does one exist?)
> a formatter to create these ASCII reports.
> 
> We are using the MSXML parser/processor.
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
----------------------------------------------------------------------
Steve Tinney                                        Babylonian Section
                                 *   University of Pennsylvania Museum
stinney@xxxxxxxxxxxxx                          Phila, PA. 215-898-4047


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


Current Thread