This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: plain txt output tips
- From: mjyoungblut at mmm dot com
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 16 Apr 2002 11:58:13 -0500
- Subject: Re: [xsl] plain txt output tips
- Reply-to: xsl-list at lists dot mulberrytech dot com
Nate,
Are you using an OutputFormat, by chance? That is, in Java, a
org.apache.xml.serialize.OutputFormat? We were using this an noticed that
we were getting lines wrapped at 72 characters. If so, just call the
following method on the OutputFormat:
setLineWidth(0); // No wrapping. The default should be 0, but
it appears to default to 72
Another suggestion - instead of traversing the tree like you have done
below
PressRelease -> MetaData -> InstitutionalPAO -> xxx
you may just want to do the following:
<xsl:apply-templates select="PressRelease/MetaData/InstitutionalPAO"/>
<xsl:template match="InstitutionalPAO">
<xsl:value-of select="FName"/><xsl:text>
</xsl:text>
<xsl:value-of select="LName"/><xsl:text>
</xsl:text>
...
</xsl:template>
Matt
<!--contact info -->
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/FName"
/><xsl:text> </xsl:text><xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/LName"
/>
<xsl:text>
</xsl:text>
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/JobTitle"
/>
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/OrgName"
/>
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/Address"
/>
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/SubAddress"
/>
But, I am not sure exactly how to send that variable
into another named recursive template and spit out
lines no greater than 72 characters long.
Could you perhaps help get me started here? I would
appreciate it.
--Nate
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list