RE: [xsl] Newbie: XML to fixed columns

Subject: RE: [xsl] Newbie: XML to fixed columns
From: HIGGINS Neil <neilhiggins@xxxxxxxxxxxxxx>
Date: Thu, 30 May 2002 22:57:42 +1000
> > I can't work out how to stop the XSLT processor from normalising the
> > whitespace in the output.
> If you show a small sample input, and your stylesheet and
> the output you want, no doubt someone could say what you're 
> doing wrong.

You're a magician, David and/or Mike! 
Blow me down, I just tried it again and it worked!
I must have had a typo first time around.
Here's the stuff, just in case you have any comments:

XML Source
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.0.1 U ( by Heather Kwan
(Energex) -->
<!--Sample XML file generated by XML Spy v4.3 U (>
<?xml-stylesheet type="text/xsl"
<activation_requests xmlns:xsi="";
date_created="2002-05-14" record_count="1">
		<account_name>MR A J SOUTHWELL</account_name>
		<form_a_name>MR A J SOUTHWELL</form_a_name>

XSL StyleSheet
<xsl:stylesheet xmlns:xsl="";
<!-- Neil Higgins, 29 May 2002, for demonstration purposes only -->
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:for-each select="//account"><xsl:value-of
select="substring(concat(account_name, '                    '), 1,
20)"/>,<!-- etc --></xsl:for-each>

Output (20 characers wide)

This email message (including any file attachments transmitted with it)
is for the sole use of the intended recipient(s) and may contain
confidential and legally privileged information. Any unauthorised
review, use, alteration, disclosure or distribution of this email
(including any attachments) by an unintended recipient is prohibited.
If you have received this email in error, please notify the sender by
return email and destroy all copies of the original message.

Any confidential or legal professional privilege is not waived
or lost by any mistaken delivery of the email.

ENERGEX accepts no responsibility for the content of any email
which is sent by an employee which is of a personal nature.


 XSL-List info and archive:

Current Thread