Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XSL question [Thread Next] Re: XSL questionTo: NULL Date: 4/10/2007 5:56:00 PM "Bryan" <bcc@n...> wrote in message news:RxVSh.7090$Kd3.6527@n...... > Is there something wrong with this: > > <xsl:variable name="newline"> > <xsl:text>\n</xsl:text> > </xsl:variable> > > I am trying to use perls XML::XSLT to process this xsl file, and it chokes > here. There is nothing wrong with this code, but it is not probably what you want. Try: <xsl:variable name="vNL" select="'
'"/> The following transformation: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:variable name="newline"> <xsl:text>\n</xsl:text> </xsl:variable> <xsl:variable name="vNL" select="'
'"/> <xsl:value-of select="$newline"/> <xsl:value-of select="$vNL"/> <xsl:value-of select="$newline"/> </xsl:template> </xsl:stylesheet> when run on any source xml document (not used), produces this result: \n \n Hope this helped. Cheers, Dimitre Novatchev | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
