Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spurious Line Feeds in XSL output

Status
Not open for further replies.

pmarden

Programmer
Mar 30, 2001
4
0
0
GB
I've got a XSL template to generate some standard code given parameters in an XML file. All seems to work fine, but some parts seem to insert line feeds where I actually want spaces. e.g.
Code:
   <sub name=&quot;ChangePst&quot;>
       <arg name=&quot;a1&quot; type=&quot;t1&quot; callby=&quot;IN&quot;/>
       <arg name=&quot;a2&quot; type=&quot;t2&quot; callby=&quot;IN&quot;/>
       <body>
          Some body stuff!
       </body>
   </sub>
Given the XSL:
Code:
<xsl:for-each select=&quot;arg&quot;><xsl:value-of select=&quot;@name&quot;/> <xsl:value-of select=&quot;@callby&quot;/> <xsl:value-of select=&quot;@type&quot;/>,
</xsl:for-each>
Notice there is a space between the @name & @callby and again between @callby and @type. For some reason these appear in the resulting html as line feeds. Then there is a line feed after the , which appears correctly.

Heres some output:
---------------------------
Code:
a1

IN
t1,
a2

IN
t2,
-------------------------------

I've tried taking the spaces out, making lots of them. But nothing works. HELP!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top