Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


VS2005 "Show xslt output" and newlines

From: kevin@-----------.---------.---
To: 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...


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent