[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Plain Text Handling in XSLT Output
On 6/7/06, Georg Hohmann <georg.hohmann@xxxxxxxxx> wrote:
Hello,
So with that in mind, use <xsl:text> </xsl:text> or <xsl:value-of select="concat(Firstname, ' ', Lastname)"/> 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?
Also, rather than use xsl:test="exists(...)" just use apply-templates, as then if the element exists it will be processed, otherwise it wont: <person> <xsl:apply-templates/> </person> <xsl:template match="mds:node17"> <name> <xsl:value-of select="."/> <xsl:apply-templates/> </name> </xsl:template> <xsl:template match="mds:node18"> <xsl:value-of select="concat('(', node18, ')'"/> <xsl:template> cheers andrew
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|