Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Newbie Question >Thread Next - Re: Newbie Question Re: Newbie QuestionTo: NULL Date: 7/1/2008 3:29:00 PM rhino wrote: > <p><xsl:value-of select="firstname"/><xsl:value-of select="lastname"/></p> > So, how do I get a blank space to appear between firstname and lastname? The most straightforward solution is: <p><xsl:value-of select="firstname"/><xsl:text> </xsl:text><xsl:value-of select="lastname"/></p> This is necessary because whitespace in stylesheets is normally discarded unless it's next to non-whitespace text. Wrapping the literal whitespace in <xsl:text> tells the processor "I really want this to be output exactly as it appears here." There are other ways to do it, of course -- anything that generates a whitespace value will accomplish the task -- but this is the one that will make the stylesheet easiest for a human to read. FWIW, we've seen a number of cases where the tutorials at w3schools have been ... well, let's be charitable and say "incomplete". They may have improved since then, but you might want to consider looking at other sources as well or instead. My standard recommendation is the DeveloperWorks XML site, http://www.ibm.com/xml, but I admit to being biased. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
