![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: VS2005 "Show xslt output" and newlines VS2005 "Show xslt output" and newlinesTo: NULL Date: 12/4/2006 10:58:00 AM
A sample xslt follows...
I am having a hell of a time getting newlines (cr/lf) to print to the output
document when testing any xslt with VS2005 or msxsl.exe. I know that the
unicode is correct because the transformations work when using they are run
by a macro I have from VS2003 as well as in the production environment.
I have played with the encoding value on the xslt's Properties box in
VS2005, with no difference.
--running sample xslt below with VS2005 or msxsl.exe
Line 1Line 2
--running sample xslt below with macro
Line 1
Line 2
The macro code-------------------
<snip>
Dim myXpathDoc As XPath.XPathDocument
myXpathDoc = New XPath.XPathDocument(xmlFile)
' Check and be sure that the current active document is an
XSLT file.
' we need an xslt transform object here
Dim xslt As Xsl.XslTransform
xslt = New Xsl.XslTransform
xslt.Load(DTE.ActiveDocument.FullName)
xslt.Transform(myXpathDoc, Nothing, writer)
<snip>
-------------------------------------
a sample xslt--------------------------------
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:param name="newline">
</xsl:param>
<xsl:template match="/">
<xsl:text>Line 1</xsl:text>
<xsl:value-of select="$newline"/>
<xsl:text>Line 2</xsl:text>
</xsl:template>
</xsl:stylesheet>
--
kevin...
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
