[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Plain Text Handling in XSLT Output

Subject: Plain Text Handling in XSLT Output
From: "Georg Hohmann" <georg.hohmann@xxxxxxxxx>
Date: Wed, 7 Jun 2006 11:53:21 +0200
xslt plain text
Hello,

i bother with the handling of plain text in xslt. My problem is that i
have to insert plain text combined with values to the output depending
on if a node exists or not (which is a very common task i guess). So
there are many xsl:if test=exists(...) statements inside my xslt.

1. Prob: White spaces
If i have a xslt like this:
...
<xsl:value-of select="Firstname"/> <xsl:value-of select="Lastname"/>
...
I always get this output:
...
FirstnameLastname
...
How do i insert a white space between (these) two values?

2. Prob: Line Feed & Carriage Return
The xslt:
...
<person>
  <xsl:if test="exists(mds:node17)">
     <name>
        <xsl:value-of select="node17"/>
        <xsl:if test="exists(node18)">
           (<xsl:value-of select="node18"/>)
        </xsl:if>
     </name>
  </xsl:if>
</person>
...
This is the expected output:
...
Lastname (Function)
...
But this is the real output:
...
Lastname
             (Function)
...
How can i control if a linefeed is added or not? Is there a possibilty
to remove or add a linefeed with xslt to the output?

I hope you have some advice for me.

Thanks,
G. Hohmann

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.