Re: [xsl] XSL Does not Transform Correctly

Subject: Re: [xsl] XSL Does not Transform Correctly
From: Kamal Bhatt <kbhatt@xxxxxxxxx>
Date: Wed, 07 Dec 2005 09:40:17 +1100
a hyphen just requires you to use a hyphen eg

<xsl:value-of select="<data1>"/>-<xsl:value-of select="<data2>"/>

For a space you need the code

Now, if you want nicely formated white space, I have a set of templates to do this, look at previous postings.
nthalank@xxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:


Thanks very much for your help.

I have made great progress.

I have two more questions.

Q1) How do I insert white space between columns in the rendered output. I
was unsuccessful using the 'xsl:text' command with the built in XSL Parser
from XML Spy Professional Edition as well as the MSXML parser from IE 6.0.

Q2) I have two columns in the rendered output. One is a database column and
the other is a user friendly name of the database column. How do I insert a
white space or a hyphen.

Below is the XSL code:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"

<xsl:template match="/">
<xsl:text> Database Column </xsl:text>
<xsl:text>                    </xsl:text>
<xsl:text>ReportNet Equivalent</xsl:text>
<xsl:for-each select="/c:project/c:namespace/c:querySubject/c:queryItem">

<xsl:value-of select="c:columnName"/>
<xsl:value-of select= "c:name" />



I attempted to insert 'xsl:text' command between the two 'xsl:value'
commands. However that screwed up the output. The column names were no
longer on the same row.


Naveen K Thalanki
Principal Software Engineer (IT Commercial Systems)
Boehringer Ingelheim Pharmaceuticals
Tel : 203 798  4630
Fax: 203 791 6601

Current Thread