[xsl] generating formatted text output

Subject: [xsl] generating formatted text output
From: "Noel Golding" <noel@xxxxxxxxxxxxxxx>
Date: Thu, 22 Aug 2002 09:39:23 -0400
I am trying to generate a text file but I am not getting the desired line
breaks. The output has some sections that just run into each other instead
of breaking and other lines have indented characters.  I have tried setting
the indent attribute of <xsl:output> both to yes and no with no effect.


<!-- ******** XML ******** -->
<?xml version="1.0"?>
<root>
 <document>

  <title>Investment Science</title>

  <section name="executive summary">
   <title>Executive Summary</title>
   <para>
   We believe the minor correction we are in will resolve bullishly. Wait
for some confirmation that the rally is in fact resuming before getting
aggressive. In the meantime, we will discuss some of the most common
psychological pitfalls that beset traders/investors and what you can do to
prevent them.
   </para>
  </section>
 </document>

 <portfolios>
  <portfolio name="aggressive">
   <title>Aggressive Portfolio</title>
   <para>The description text goes here</para>
   <section name="model">
    <stock symbol="asd" purchasedate="2001-02-12" purchaseprice="34.34"/>
    <stock symbol="wer" purchasedate="2002-03-21" purchaseprice="34.0" />
   </section>
   <section name="sells">
    <stock symbol="csco" selldate="2002-08-21" sellprice="0.0"/>
   </section>
   <section name="buys">
    <stock symbol="msft" purchasedate="2002-08-21"/>
   </section>
  </portfolio>

  <portfolio name="bestbuys">
   <title>Best Opportunities</title>
   <para>One week hold</para>
   <stock symbol="dell" stopprice="76.0" companyname="dell comp corp" />
   <stock symbol="pfe" stopprice="100.0" companyname="pfizer" />
  </portfolio>
 </portfolios>

<header volume="8" issuedate="August 19, 2002" number="28" link="08192002"
/>

</root>


<!-- ******** XSLT ******** -->
<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:output method="text" />

<xsl:variable name="page" select="/root/header/@link" />
<xsl:variable name="volume" select="/root/header/@volume" />
<xsl:variable name="number" select="/root/header/@number" />
<xsl:variable name="issuedate" select="/root/header/@issuedate" />

<xsl:template match="root">

Excerpts from this week's issue
Volume <xsl:value-of select="$volume"/>, Number <xsl:value-of
select="$number" />:
<xsl:value-of select="$issuedate"/>

<xsl:apply-templates select="document/title" />

<xsl:apply-templates select="document/section[@name='executive summary']" />

<xsl:apply-templates select="portfolios/portfolio[@name='bestbuys']"/>

<xsl:apply-templates select="portfolios/portfolio[@name='aggressive']" />

<xsl:apply-templates select="portfolios/section[@name='timing']" />

To access the Full Version of the Newsletter and Tables,
click the link below:

http://<xsl:value-of select="$page"/>/

</xsl:template>

</xsl:stylesheet>

<!-- ******** Actual output ******** -->

Excerpts from this week's issue
Volume 8, Number 28:
August 19, 2002Investment Science
   Executive Summary

   We believe the minor correction we are in will resolve bullishly. Wait
for some confirmation that the rally is in fact resuming before getting
aggressive. In the meantime, we will discuss some of the most common
psychological pitfalls that beset traders/investors and what you can do to
prevent them.


   Best Opportunities
   One week hold



   Aggressive Portfolio
   The description text goes here












To access the Full Version of the Newsletter and Tables,
click the link below:

http://08192002/


<!-- ******** Desired output ******** -->

Excerpts from this week's issue
Volume 8, Number 28:
August 19, 2002

Investment Science

Executive Summary

We believe the minor correction we are in will resolve bullishly. Wait for
some confirmation that the rally is in fact resuming before getting
aggressive. In the meantime, we will discuss some of the most common
psychological pitfalls that beset traders/investors and what you can do to
prevent them.


Best Opportunities
One week hold



Aggressive Portfolio
The description text goes here


To access the Full Version of the Newsletter and Tables,
click the link below:

http://08192002/


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


Current Thread