I'm getting a strange result when I reference an external
xml document in my XSLT. The transformation work's fine in
Xselerator, but not in .NET. It looks as though I'm
getting garbage in the output. Here's the relevant portion
of the xslt:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes"/>
<xsl:variable name="xmlDataset" select="document
('file:\\C:\dataset.xml')"/>
<xsl:template match="/">
<Record>
<DataFields>
<DataField Value="0001"/>
<DataField>
<xsl:attribute name="Value">
<xsl:value-of
select="$xmlDataset//Table/Company_Name"/>
</xsl:attribute>
</DataField>
</DataFields>
<xsl:apply-templates select="//Table"/>
</Record>
</xsl:template>
The results from the input file are fine, but the result
of the select="$xmlDataset//Table/Company_Name" which
references the external document looks like this:
<DataField Value=\"admin\t
\t\t\t\t\t\t\Test
Company">
</DataField>
The 'Test Company' is correct, but what's up with all of
the stuff before that? Like I said, it works fine in
Xselerator using MSXML4.
Mike - 28 Jun 2004 16:19 GMT
Found my problem. The answer isn't even worth posting.