RE: [xsl] text output with some significant white space

Subject: RE: [xsl] text output with some significant white space
From: "Steve Renshaw" <renshaw_steve@xxxxxxxxxxx>
Date: Thu, 19 Apr 2001 16:08:17 -0000
I am generating text file so can't have and <img>'s in output.

I tried <xsl:text> to add spaces:
<xsl:text> </xsl:text> will put a space in output but it isn't
easy to visually distinguish one number of spaces from another.
as needed for indention of say {3 6 9 12 ...} spaces. It also
balloons line out making very hard read.

From: "Ralof" <ralof@xxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [xsl] text output with some significant white space
Date: Thu, 19 Apr 2001 17:30:23 +0200

I guess my method for whitespace is not a very good one,
but it is quite simple:

**********<xsl:template match="foo">
*************begin@<xsl:value-of select="name"/><img src="cleardot.gif"
width="4" height="1"/>{<br/>
*************<img src="cleardot.gif" width="12" height="1"/><xsl:value-of
*************<img src="cleardot.gif" width="12" height="1"/>}

Please don't laugh :)


> > > I have xml file and need to transform it to a *text* file that > will have *no* xml tags it it at all. I *do* need to control > indention and carriage returns in text file and at same > time I want the XSLt to be readable with regards to consistent > indention of say -three spaces. how can I accomplish following > > Here is part ofstylesheet XSLT: > **********<xsl:template match="foo"> > *************begin@<xsl:value-of select="name"/>@{! > *************@@@<xsl:value-of select="body"/>! > *************@@@} > **********</xsl:template> > > *=space in style sheet > @=significant space to place in output > !=significant carriage return to place in output > > Here is XML file > <foo> > <name>bar</name> > <body>y=a+b*c;</body> > </foo> > > Here is desired outptu: > begin foo { > y=a+b*c; > } > > I trid <xsl:text>, <xsl:output method="text">, entities but > can't find right combination that gives full control of text > file output for indentation and carriage return. Help? >

XSL-List info and archive:

_________________________________________________________________ Get your FREE download of MSN Explorer at

XSL-List info and archive:

Current Thread